radius 0.7.4 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +8 -0
- data/CONTRIBUTORS +2 -0
- data/Gemfile +16 -2
- data/README.rdoc +2 -6
- data/Rakefile +10 -1
- data/coverage/assets/{0.7.1 → 0.10.2}/application.css +52 -363
- data/coverage/assets/{0.7.1 → 0.10.2}/application.js +1153 -72
- data/coverage/assets/0.10.2/colorbox/border.png +0 -0
- data/coverage/assets/0.10.2/colorbox/controls.png +0 -0
- data/coverage/assets/0.10.2/colorbox/loading.gif +0 -0
- data/coverage/assets/0.10.2/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_asc.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_asc_disabled.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_both.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_desc.png +0 -0
- data/coverage/assets/0.13.1/DataTables-1.10.20/images/sort_desc_disabled.png +0 -0
- data/coverage/assets/0.13.1/application.css +1 -0
- data/coverage/assets/0.13.1/application.js +7 -0
- data/coverage/assets/0.13.1/colorbox/border.png +0 -0
- data/coverage/assets/0.13.1/colorbox/controls.png +0 -0
- data/coverage/assets/0.13.1/colorbox/loading.gif +0 -0
- data/coverage/assets/0.13.1/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.13.1/favicon_green.png +0 -0
- data/coverage/assets/0.13.1/favicon_red.png +0 -0
- data/coverage/assets/0.13.1/favicon_yellow.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.13.1/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.13.1/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.13.1/loading.gif +0 -0
- data/coverage/assets/0.13.1/magnify.png +0 -0
- data/lib/radius/context.rb +2 -1
- data/lib/radius/delegating_open_struct.rb +15 -19
- data/lib/radius/ord_string.rb +6 -8
- data/lib/radius/parser/JavaScanner.class +0 -0
- data/lib/radius/parser/JavaScanner.java +211 -161
- data/lib/radius/parser/JavaScanner.rl +36 -7
- data/lib/radius/parser/scanner.rb +2 -2
- data/lib/radius/parser.rb +69 -40
- data/lib/radius/utility.rb +5 -14
- data/lib/radius/version.rb +1 -1
- data/lib/radius.rb +11 -11
- data/pkg/radius-0.8.0.gem +0 -0
- data/radius.gemspec +12 -4
- data/test/context_test.rb +13 -5
- data/test/multithreaded_test.rb +60 -43
- data/test/ord_string_test.rb +3 -3
- data/test/parser_test.rb +11 -3
- data/test/quickstart_test.rb +2 -2
- data/test/squiggle_test.rb +3 -3
- data/test/test_helper.rb +21 -26
- data/test/utility_test.rb +3 -3
- metadata +86 -70
- data/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
- data/pkg/radius-0.7.0.prerelease.gem +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/favicon_green.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/favicon_red.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/favicon_yellow.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/loading.gif +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/magnify.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-icons_222222_256x240.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-icons_454545_256x240.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-icons_888888_256x240.png +0 -0
- /data/coverage/assets/{0.7.1 → 0.10.2}/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
@@ -18,6 +18,1097 @@
|
|
18
18
|
shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
|
19
19
|
)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
|
20
20
|
var hljs=new function(){function l(o){return o.replace(/&/gm,"&").replace(/</gm,"<")}function c(q,p,o){return RegExp(p,"m"+(q.cI?"i":"")+(o?"g":""))}function i(q){for(var o=0;o<q.childNodes.length;o++){var p=q.childNodes[o];if(p.nodeName=="CODE"){return p}if(!(p.nodeType==3&&p.nodeValue.match(/\s+/))){break}}}function g(s,r){var q="";for(var p=0;p<s.childNodes.length;p++){if(s.childNodes[p].nodeType==3){var o=s.childNodes[p].nodeValue;if(r){o=o.replace(/\n/g,"")}q+=o}else{if(s.childNodes[p].nodeName=="BR"){q+="\n"}else{q+=g(s.childNodes[p])}}}if(/MSIE [678]/.test(navigator.userAgent)){q=q.replace(/\r/g,"\n")}return q}function a(r){var p=r.className.split(/\s+/);p=p.concat(r.parentNode.className.split(/\s+/));for(var o=0;o<p.length;o++){var q=p[o].replace(/^language-/,"");if(d[q]||q=="no-highlight"){return q}}}function b(o){var p=[];(function(r,s){for(var q=0;q<r.childNodes.length;q++){if(r.childNodes[q].nodeType==3){s+=r.childNodes[q].nodeValue.length}else{if(r.childNodes[q].nodeName=="BR"){s+=1}else{p.push({event:"start",offset:s,node:r.childNodes[q]});s=arguments.callee(r.childNodes[q],s);p.push({event:"stop",offset:s,node:r.childNodes[q]})}}}return s})(o,0);return p}function k(x,y,w){var q=0;var v="";var s=[];function t(){if(x.length&&y.length){if(x[0].offset!=y[0].offset){return(x[0].offset<y[0].offset)?x:y}else{return y[0].event=="start"?x:y}}else{return x.length?x:y}}function r(B){var C="<"+B.nodeName.toLowerCase();for(var z=0;z<B.attributes.length;z++){var A=B.attributes[z];C+=" "+A.nodeName.toLowerCase();if(A.nodeValue!=undefined){C+='="'+l(A.nodeValue)+'"'}}return C+">"}while(x.length||y.length){var u=t().splice(0,1)[0];v+=l(w.substr(q,u.offset-q));q=u.offset;if(u.event=="start"){v+=r(u.node);s.push(u.node)}else{if(u.event=="stop"){var p=s.length;do{p--;var o=s[p];v+=("</"+o.nodeName.toLowerCase()+">")}while(o!=u.node);s.splice(p,1);while(p<s.length){v+=r(s[p]);p++}}}}v+=w.substr(q);return v}function f(I,C){function y(r,L){for(var K=0;K<L.c.length;K++){if(L.c[K].bR.test(r)){return L.c[K]}}}function v(K,r){if(B[K].e&&B[K].eR.test(r)){return 1}if(B[K].eW){var L=v(K-1,r);return L?L+1:0}return 0}function w(r,K){return K.iR&&K.iR.test(r)}function z(N,M){var L=[];for(var K=0;K<N.c.length;K++){L.push(N.c[K].b)}var r=B.length-1;do{if(B[r].e){L.push(B[r].e)}r--}while(B[r+1].eW);if(N.i){L.push(N.i)}return c(M,"("+L.join("|")+")",true)}function q(L,K){var M=B[B.length-1];if(!M.t){M.t=z(M,G)}M.t.lastIndex=K;var r=M.t.exec(L);if(r){return[L.substr(K,r.index-K),r[0],false]}else{return[L.substr(K),"",true]}}function o(N,r){var K=G.cI?r[0].toLowerCase():r[0];for(var M in N.kG){if(!N.kG.hasOwnProperty(M)){continue}var L=N.kG[M].hasOwnProperty(K);if(L){return[M,L]}}return false}function E(L,N){if(!N.k){return l(L)}var M="";var O=0;N.lR.lastIndex=0;var K=N.lR.exec(L);while(K){M+=l(L.substr(O,K.index-O));var r=o(N,K);if(r){s+=r[1];M+='<span class="'+r[0]+'">'+l(K[0])+"</span>"}else{M+=l(K[0])}O=N.lR.lastIndex;K=N.lR.exec(L)}M+=l(L.substr(O,L.length-O));return M}function J(r,L){if(L.sL&&d[L.sL]){var K=f(L.sL,r);s+=K.keyword_count;return K.value}else{return E(r,L)}}function H(L,r){var K=L.cN?'<span class="'+L.cN+'">':"";if(L.rB){p+=K;L.buffer=""}else{if(L.eB){p+=l(r)+K;L.buffer=""}else{p+=K;L.buffer=r}}B.push(L);A+=L.r}function D(N,K,P){var Q=B[B.length-1];if(P){p+=J(Q.buffer+N,Q);return false}var L=y(K,Q);if(L){p+=J(Q.buffer+N,Q);H(L,K);return L.rB}var r=v(B.length-1,K);if(r){var M=Q.cN?"</span>":"";if(Q.rE){p+=J(Q.buffer+N,Q)+M}else{if(Q.eE){p+=J(Q.buffer+N,Q)+M+l(K)}else{p+=J(Q.buffer+N+K,Q)+M}}while(r>1){M=B[B.length-2].cN?"</span>":"";p+=M;r--;B.length--}var O=B[B.length-1];B.length--;B[B.length-1].buffer="";if(O.starts){H(O.starts,"")}return Q.rE}if(w(K,Q)){throw"Illegal"}}var G=d[I];var B=[G.dM];var A=0;var s=0;var p="";try{var u=0;G.dM.buffer="";do{var x=q(C,u);var t=D(x[0],x[1],x[2]);u+=x[0].length;if(!t){u+=x[1].length}}while(!x[2]);if(B.length>1){throw"Illegal"}return{language:I,r:A,keyword_count:s,value:p}}catch(F){if(F=="Illegal"){return{language:null,r:0,keyword_count:0,value:l(C)}}else{throw F}}}function h(){function o(t,s,u){if(t.compiled){return}if(!u){t.bR=c(s,t.b?t.b:"\\B|\\b");if(!t.e&&!t.eW){t.e="\\B|\\b"}if(t.e){t.eR=c(s,t.e)}}if(t.i){t.iR=c(s,t.i)}if(t.r==undefined){t.r=1}if(t.k){t.lR=c(s,t.l||hljs.IR,true)}for(var r in t.k){if(!t.k.hasOwnProperty(r)){continue}if(t.k[r] instanceof Object){t.kG=t.k}else{t.kG={keyword:t.k}}break}if(!t.c){t.c=[]}t.compiled=true;for(var q=0;q<t.c.length;q++){o(t.c[q],s,false)}if(t.starts){o(t.starts,s,false)}}for(var p in d){if(!d.hasOwnProperty(p)){continue}o(d[p].dM,d[p],true)}}function e(){if(e.called){return}e.called=true;h()}function n(t,y,p){e();var A=g(t,p);var r=a(t);if(r=="no-highlight"){return}if(r){var w=f(r,A)}else{var w={language:"",keyword_count:0,r:0,value:l(A)};var x=w;for(var z in d){if(!d.hasOwnProperty(z)){continue}var u=f(z,A);if(u.keyword_count+u.r>x.keyword_count+x.r){x=u}if(u.keyword_count+u.r>w.keyword_count+w.r){x=w;w=u}}}var s=t.className;if(!s.match(w.language)){s=s?(s+" "+w.language):w.language}var o=b(t);if(o.length){var q=document.createElement("pre");q.innerHTML=w.value;w.value=k(o,b(q),A)}if(y){w.value=w.value.replace(/^((<[^>]+>|\t)+)/gm,function(B,E,D,C){return E.replace(/\t/g,y)})}if(p){w.value=w.value.replace(/\n/g,"<br>")}if(/MSIE [678]/.test(navigator.userAgent)&&t.tagName=="CODE"&&t.parentNode.tagName=="PRE"){var q=t.parentNode;var v=document.createElement("div");v.innerHTML="<pre><code>"+w.value+"</code></pre>";t=v.firstChild.firstChild;v.firstChild.cN=q.cN;q.parentNode.replaceChild(v.firstChild,q)}else{t.innerHTML=w.value}t.className=s;t.dataset={};t.dataset.result={language:w.language,kw:w.keyword_count,re:w.r};if(x&&x.language){t.dataset.second_best={language:x.language,kw:x.keyword_count,re:x.r}}}function j(){if(j.called){return}j.called=true;e();var q=document.getElementsByTagName("pre");for(var o=0;o<q.length;o++){var p=i(q[o]);if(p){n(p,hljs.tabReplace)}}}function m(){var o=arguments;var p=function(){j.apply(null,o)};if(window.addEventListener){window.addEventListener("DOMContentLoaded",p,false);window.addEventListener("load",p,false)}else{if(window.attachEvent){window.attachEvent("onload",p)}else{window.onload=p}}}var d={};this.LANGUAGES=d;this.initHighlightingOnLoad=m;this.highlightBlock=n;this.initHighlighting=j;this.IR="[a-zA-Z][a-zA-Z0-9_]*";this.UIR="[a-zA-Z_][a-zA-Z0-9_]*";this.NR="\\b\\d+(\\.\\d+)?";this.CNR="\\b(0x[A-Za-z0-9]+|\\d+(\\.\\d+)?)";this.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|\\.|-|-=|/|/=|:|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~";this.BE={b:"\\\\.",r:0};this.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[this.BE],r:0};this.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[this.BE],r:0};this.CLCM={cN:"comment",b:"//",e:"$"};this.CBLCLM={cN:"comment",b:"/\\*",e:"\\*/"};this.HCM={cN:"comment",b:"#",e:"$"};this.NM={cN:"number",b:this.NR,r:0};this.CNM={cN:"number",b:this.CNR,r:0};this.inherit=function(o,r){var q={};for(var p in o){q[p]=o[p]}if(r){for(var p in r){q[p]=r[p]}}return q}}();hljs.LANGUAGES.ruby=function(){var g="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?";var a="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?";var n={keyword:{and:1,"false":1,then:1,defined:1,module:1,"in":1,"return":1,redo:1,"if":1,BEGIN:1,retry:1,end:1,"for":1,"true":1,self:1,when:1,next:1,until:1,"do":1,begin:1,unless:1,END:1,rescue:1,nil:1,"else":1,"break":1,undef:1,not:1,"super":1,"class":1,"case":1,require:1,yield:1,alias:1,"while":1,ensure:1,elsif:1,or:1,def:1},keymethods:{__id__:1,__send__:1,abort:1,abs:1,"all?":1,allocate:1,ancestors:1,"any?":1,arity:1,assoc:1,at:1,at_exit:1,autoload:1,"autoload?":1,"between?":1,binding:1,binmode:1,"block_given?":1,call:1,callcc:1,caller:1,capitalize:1,"capitalize!":1,casecmp:1,"catch":1,ceil:1,center:1,chomp:1,"chomp!":1,chop:1,"chop!":1,chr:1,"class":1,class_eval:1,"class_variable_defined?":1,class_variables:1,clear:1,clone:1,close:1,close_read:1,close_write:1,"closed?":1,coerce:1,collect:1,"collect!":1,compact:1,"compact!":1,concat:1,"const_defined?":1,const_get:1,const_missing:1,const_set:1,constants:1,count:1,crypt:1,"default":1,default_proc:1,"delete":1,"delete!":1,delete_at:1,delete_if:1,detect:1,display:1,div:1,divmod:1,downcase:1,"downcase!":1,downto:1,dump:1,dup:1,each:1,each_byte:1,each_index:1,each_key:1,each_line:1,each_pair:1,each_value:1,each_with_index:1,"empty?":1,entries:1,eof:1,"eof?":1,"eql?":1,"equal?":1,"eval":1,exec:1,exit:1,"exit!":1,extend:1,fail:1,fcntl:1,fetch:1,fileno:1,fill:1,find:1,find_all:1,first:1,flatten:1,"flatten!":1,floor:1,flush:1,for_fd:1,foreach:1,fork:1,format:1,freeze:1,"frozen?":1,fsync:1,getc:1,gets:1,global_variables:1,grep:1,gsub:1,"gsub!":1,"has_key?":1,"has_value?":1,hash:1,hex:1,id:1,include:1,"include?":1,included_modules:1,index:1,indexes:1,indices:1,induced_from:1,inject:1,insert:1,inspect:1,instance_eval:1,instance_method:1,instance_methods:1,"instance_of?":1,"instance_variable_defined?":1,instance_variable_get:1,instance_variable_set:1,instance_variables:1,"integer?":1,intern:1,invert:1,ioctl:1,"is_a?":1,isatty:1,"iterator?":1,join:1,"key?":1,keys:1,"kind_of?":1,lambda:1,last:1,length:1,lineno:1,ljust:1,load:1,local_variables:1,loop:1,lstrip:1,"lstrip!":1,map:1,"map!":1,match:1,max:1,"member?":1,merge:1,"merge!":1,method:1,"method_defined?":1,method_missing:1,methods:1,min:1,module_eval:1,modulo:1,name:1,nesting:1,"new":1,next:1,"next!":1,"nil?":1,nitems:1,"nonzero?":1,object_id:1,oct:1,open:1,pack:1,partition:1,pid:1,pipe:1,pop:1,popen:1,pos:1,prec:1,prec_f:1,prec_i:1,print:1,printf:1,private_class_method:1,private_instance_methods:1,"private_method_defined?":1,private_methods:1,proc:1,protected_instance_methods:1,"protected_method_defined?":1,protected_methods:1,public_class_method:1,public_instance_methods:1,"public_method_defined?":1,public_methods:1,push:1,putc:1,puts:1,quo:1,raise:1,rand:1,rassoc:1,read:1,read_nonblock:1,readchar:1,readline:1,readlines:1,readpartial:1,rehash:1,reject:1,"reject!":1,remainder:1,reopen:1,replace:1,require:1,"respond_to?":1,reverse:1,"reverse!":1,reverse_each:1,rewind:1,rindex:1,rjust:1,round:1,rstrip:1,"rstrip!":1,scan:1,seek:1,select:1,send:1,set_trace_func:1,shift:1,singleton_method_added:1,singleton_methods:1,size:1,sleep:1,slice:1,"slice!":1,sort:1,"sort!":1,sort_by:1,split:1,sprintf:1,squeeze:1,"squeeze!":1,srand:1,stat:1,step:1,store:1,strip:1,"strip!":1,sub:1,"sub!":1,succ:1,"succ!":1,sum:1,superclass:1,swapcase:1,"swapcase!":1,sync:1,syscall:1,sysopen:1,sysread:1,sysseek:1,system:1,syswrite:1,taint:1,"tainted?":1,tell:1,test:1,"throw":1,times:1,to_a:1,to_ary:1,to_f:1,to_hash:1,to_i:1,to_int:1,to_io:1,to_proc:1,to_s:1,to_str:1,to_sym:1,tr:1,"tr!":1,tr_s:1,"tr_s!":1,trace_var:1,transpose:1,trap:1,truncate:1,"tty?":1,type:1,ungetc:1,uniq:1,"uniq!":1,unpack:1,unshift:1,untaint:1,untrace_var:1,upcase:1,"upcase!":1,update:1,upto:1,"value?":1,values:1,values_at:1,warn:1,write:1,write_nonblock:1,"zero?":1,zip:1}};var h={cN:"yardoctag",b:"@[A-Za-z]+"};var d={cN:"comment",b:"#",e:"$",c:[h]};var c={cN:"comment",b:"^\\=begin",e:"^\\=end",c:[h],r:10};var b={cN:"comment",b:"^__END__",e:"\\n$"};var u={cN:"subst",b:"#\\{",e:"}",l:g,k:n};var p=[hljs.BE,u];var s={cN:"string",b:"'",e:"'",c:p,r:0};var r={cN:"string",b:'"',e:'"',c:p,r:0};var q={cN:"string",b:"%[qw]?\\(",e:"\\)",c:p,r:10};var o={cN:"string",b:"%[qw]?\\[",e:"\\]",c:p,r:10};var m={cN:"string",b:"%[qw]?{",e:"}",c:p,r:10};var l={cN:"string",b:"%[qw]?<",e:">",c:p,r:10};var k={cN:"string",b:"%[qw]?/",e:"/",c:p,r:10};var j={cN:"string",b:"%[qw]?%",e:"%",c:p,r:10};var i={cN:"string",b:"%[qw]?-",e:"-",c:p,r:10};var t={cN:"string",b:"%[qw]?\\|",e:"\\|",c:p,r:10};var e={cN:"function",b:"\\bdef\\s+",e:" |$|;",l:g,k:n,c:[{cN:"title",b:a,l:g,k:n},{cN:"params",b:"\\(",e:"\\)",l:g,k:n},d,c,b]};var f={cN:"identifier",b:g,l:g,k:n,r:0};var v=[d,c,b,s,r,q,o,m,l,k,j,i,t,{cN:"class",b:"\\b(class|module)\\b",e:"$|;",k:{"class":1,module:1},c:[{cN:"title",b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?",r:0},{cN:"inheritance",b:"<\\s*",c:[{cN:"parent",b:"("+hljs.IR+"::)?"+hljs.IR}]},d,c,b]},e,{cN:"constant",b:"(::)?([A-Z]\\w*(::)?)+",r:0},{cN:"symbol",b:":",c:[s,r,q,o,m,l,k,j,i,t,f],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"number",b:"\\?\\w"},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},f,{b:"("+hljs.RSR+")\\s*",c:[d,c,b,{cN:"regexp",b:"/",e:"/[a-z]*",i:"\\n",c:[hljs.BE]}],r:0}];u.c=v;e.c[1].c=v;return{dM:{l:g,k:n,c:v}}}();
|
21
|
+
/*!
|
22
|
+
Colorbox v1.5.13 - 2014-08-04
|
23
|
+
jQuery lightbox and modal window plugin
|
24
|
+
(c) 2014 Jack Moore - http://www.jacklmoore.com/colorbox
|
25
|
+
license: http://www.opensource.org/licenses/mit-license.php
|
26
|
+
*/
|
27
|
+
|
28
|
+
(function ($, document, window) {
|
29
|
+
var
|
30
|
+
// Default settings object.
|
31
|
+
// See http://jacklmoore.com/colorbox for details.
|
32
|
+
defaults = {
|
33
|
+
// data sources
|
34
|
+
html: false,
|
35
|
+
photo: false,
|
36
|
+
iframe: false,
|
37
|
+
inline: false,
|
38
|
+
|
39
|
+
// behavior and appearance
|
40
|
+
transition: "elastic",
|
41
|
+
speed: 300,
|
42
|
+
fadeOut: 300,
|
43
|
+
width: false,
|
44
|
+
initialWidth: "600",
|
45
|
+
innerWidth: false,
|
46
|
+
maxWidth: false,
|
47
|
+
height: false,
|
48
|
+
initialHeight: "450",
|
49
|
+
innerHeight: false,
|
50
|
+
maxHeight: false,
|
51
|
+
scalePhotos: true,
|
52
|
+
scrolling: true,
|
53
|
+
opacity: 0.9,
|
54
|
+
preloading: true,
|
55
|
+
className: false,
|
56
|
+
overlayClose: true,
|
57
|
+
escKey: true,
|
58
|
+
arrowKey: true,
|
59
|
+
top: false,
|
60
|
+
bottom: false,
|
61
|
+
left: false,
|
62
|
+
right: false,
|
63
|
+
fixed: false,
|
64
|
+
data: undefined,
|
65
|
+
closeButton: true,
|
66
|
+
fastIframe: true,
|
67
|
+
open: false,
|
68
|
+
reposition: true,
|
69
|
+
loop: true,
|
70
|
+
slideshow: false,
|
71
|
+
slideshowAuto: true,
|
72
|
+
slideshowSpeed: 2500,
|
73
|
+
slideshowStart: "start slideshow",
|
74
|
+
slideshowStop: "stop slideshow",
|
75
|
+
photoRegex: /\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,
|
76
|
+
|
77
|
+
// alternate image paths for high-res displays
|
78
|
+
retinaImage: false,
|
79
|
+
retinaUrl: false,
|
80
|
+
retinaSuffix: '@2x.$1',
|
81
|
+
|
82
|
+
// internationalization
|
83
|
+
current: "image {current} of {total}",
|
84
|
+
previous: "previous",
|
85
|
+
next: "next",
|
86
|
+
close: "close",
|
87
|
+
xhrError: "This content failed to load.",
|
88
|
+
imgError: "This image failed to load.",
|
89
|
+
|
90
|
+
// accessbility
|
91
|
+
returnFocus: true,
|
92
|
+
trapFocus: true,
|
93
|
+
|
94
|
+
// callbacks
|
95
|
+
onOpen: false,
|
96
|
+
onLoad: false,
|
97
|
+
onComplete: false,
|
98
|
+
onCleanup: false,
|
99
|
+
onClosed: false,
|
100
|
+
|
101
|
+
rel: function() {
|
102
|
+
return this.rel;
|
103
|
+
},
|
104
|
+
href: function() {
|
105
|
+
// using this.href would give the absolute url, when the href may have been inteded as a selector (e.g. '#container')
|
106
|
+
return $(this).attr('href');
|
107
|
+
},
|
108
|
+
title: function() {
|
109
|
+
return this.title;
|
110
|
+
}
|
111
|
+
},
|
112
|
+
|
113
|
+
// Abstracting the HTML and event identifiers for easy rebranding
|
114
|
+
colorbox = 'colorbox',
|
115
|
+
prefix = 'cbox',
|
116
|
+
boxElement = prefix + 'Element',
|
117
|
+
|
118
|
+
// Events
|
119
|
+
event_open = prefix + '_open',
|
120
|
+
event_load = prefix + '_load',
|
121
|
+
event_complete = prefix + '_complete',
|
122
|
+
event_cleanup = prefix + '_cleanup',
|
123
|
+
event_closed = prefix + '_closed',
|
124
|
+
event_purge = prefix + '_purge',
|
125
|
+
|
126
|
+
// Cached jQuery Object Variables
|
127
|
+
$overlay,
|
128
|
+
$box,
|
129
|
+
$wrap,
|
130
|
+
$content,
|
131
|
+
$topBorder,
|
132
|
+
$leftBorder,
|
133
|
+
$rightBorder,
|
134
|
+
$bottomBorder,
|
135
|
+
$related,
|
136
|
+
$window,
|
137
|
+
$loaded,
|
138
|
+
$loadingBay,
|
139
|
+
$loadingOverlay,
|
140
|
+
$title,
|
141
|
+
$current,
|
142
|
+
$slideshow,
|
143
|
+
$next,
|
144
|
+
$prev,
|
145
|
+
$close,
|
146
|
+
$groupControls,
|
147
|
+
$events = $('<a/>'), // $({}) would be prefered, but there is an issue with jQuery 1.4.2
|
148
|
+
|
149
|
+
// Variables for cached values or use across multiple functions
|
150
|
+
settings,
|
151
|
+
interfaceHeight,
|
152
|
+
interfaceWidth,
|
153
|
+
loadedHeight,
|
154
|
+
loadedWidth,
|
155
|
+
index,
|
156
|
+
photo,
|
157
|
+
open,
|
158
|
+
active,
|
159
|
+
closing,
|
160
|
+
loadingTimer,
|
161
|
+
publicMethod,
|
162
|
+
div = "div",
|
163
|
+
requests = 0,
|
164
|
+
previousCSS = {},
|
165
|
+
init;
|
166
|
+
|
167
|
+
// ****************
|
168
|
+
// HELPER FUNCTIONS
|
169
|
+
// ****************
|
170
|
+
|
171
|
+
// Convenience function for creating new jQuery objects
|
172
|
+
function $tag(tag, id, css) {
|
173
|
+
var element = document.createElement(tag);
|
174
|
+
|
175
|
+
if (id) {
|
176
|
+
element.id = prefix + id;
|
177
|
+
}
|
178
|
+
|
179
|
+
if (css) {
|
180
|
+
element.style.cssText = css;
|
181
|
+
}
|
182
|
+
|
183
|
+
return $(element);
|
184
|
+
}
|
185
|
+
|
186
|
+
// Get the window height using innerHeight when available to avoid an issue with iOS
|
187
|
+
// http://bugs.jquery.com/ticket/6724
|
188
|
+
function winheight() {
|
189
|
+
return window.innerHeight ? window.innerHeight : $(window).height();
|
190
|
+
}
|
191
|
+
|
192
|
+
function Settings(element, options) {
|
193
|
+
if (options !== Object(options)) {
|
194
|
+
options = {};
|
195
|
+
}
|
196
|
+
|
197
|
+
this.cache = {};
|
198
|
+
this.el = element;
|
199
|
+
|
200
|
+
this.value = function(key) {
|
201
|
+
var dataAttr;
|
202
|
+
|
203
|
+
if (this.cache[key] === undefined) {
|
204
|
+
dataAttr = $(this.el).attr('data-cbox-'+key);
|
205
|
+
|
206
|
+
if (dataAttr !== undefined) {
|
207
|
+
this.cache[key] = dataAttr;
|
208
|
+
} else if (options[key] !== undefined) {
|
209
|
+
this.cache[key] = options[key];
|
210
|
+
} else if (defaults[key] !== undefined) {
|
211
|
+
this.cache[key] = defaults[key];
|
212
|
+
}
|
213
|
+
}
|
214
|
+
|
215
|
+
return this.cache[key];
|
216
|
+
};
|
217
|
+
|
218
|
+
this.get = function(key) {
|
219
|
+
var value = this.value(key);
|
220
|
+
return $.isFunction(value) ? value.call(this.el, this) : value;
|
221
|
+
};
|
222
|
+
}
|
223
|
+
|
224
|
+
// Determine the next and previous members in a group.
|
225
|
+
function getIndex(increment) {
|
226
|
+
var
|
227
|
+
max = $related.length,
|
228
|
+
newIndex = (index + increment) % max;
|
229
|
+
|
230
|
+
return (newIndex < 0) ? max + newIndex : newIndex;
|
231
|
+
}
|
232
|
+
|
233
|
+
// Convert '%' and 'px' values to integers
|
234
|
+
function setSize(size, dimension) {
|
235
|
+
return Math.round((/%/.test(size) ? ((dimension === 'x' ? $window.width() : winheight()) / 100) : 1) * parseInt(size, 10));
|
236
|
+
}
|
237
|
+
|
238
|
+
// Checks an href to see if it is a photo.
|
239
|
+
// There is a force photo option (photo: true) for hrefs that cannot be matched by the regex.
|
240
|
+
function isImage(settings, url) {
|
241
|
+
return settings.get('photo') || settings.get('photoRegex').test(url);
|
242
|
+
}
|
243
|
+
|
244
|
+
function retinaUrl(settings, url) {
|
245
|
+
return settings.get('retinaUrl') && window.devicePixelRatio > 1 ? url.replace(settings.get('photoRegex'), settings.get('retinaSuffix')) : url;
|
246
|
+
}
|
247
|
+
|
248
|
+
function trapFocus(e) {
|
249
|
+
if ('contains' in $box[0] && !$box[0].contains(e.target) && e.target !== $overlay[0]) {
|
250
|
+
e.stopPropagation();
|
251
|
+
$box.focus();
|
252
|
+
}
|
253
|
+
}
|
254
|
+
|
255
|
+
function setClass(str) {
|
256
|
+
if (setClass.str !== str) {
|
257
|
+
$box.add($overlay).removeClass(setClass.str).addClass(str);
|
258
|
+
setClass.str = str;
|
259
|
+
}
|
260
|
+
}
|
261
|
+
|
262
|
+
function getRelated(rel) {
|
263
|
+
index = 0;
|
264
|
+
|
265
|
+
if (rel && rel !== false && rel !== 'nofollow') {
|
266
|
+
$related = $('.' + boxElement).filter(function () {
|
267
|
+
var options = $.data(this, colorbox);
|
268
|
+
var settings = new Settings(this, options);
|
269
|
+
return (settings.get('rel') === rel);
|
270
|
+
});
|
271
|
+
index = $related.index(settings.el);
|
272
|
+
|
273
|
+
// Check direct calls to Colorbox.
|
274
|
+
if (index === -1) {
|
275
|
+
$related = $related.add(settings.el);
|
276
|
+
index = $related.length - 1;
|
277
|
+
}
|
278
|
+
} else {
|
279
|
+
$related = $(settings.el);
|
280
|
+
}
|
281
|
+
}
|
282
|
+
|
283
|
+
function trigger(event) {
|
284
|
+
// for external use
|
285
|
+
$(document).trigger(event);
|
286
|
+
// for internal use
|
287
|
+
$events.triggerHandler(event);
|
288
|
+
}
|
289
|
+
|
290
|
+
var slideshow = (function(){
|
291
|
+
var active,
|
292
|
+
className = prefix + "Slideshow_",
|
293
|
+
click = "click." + prefix,
|
294
|
+
timeOut;
|
295
|
+
|
296
|
+
function clear () {
|
297
|
+
clearTimeout(timeOut);
|
298
|
+
}
|
299
|
+
|
300
|
+
function set() {
|
301
|
+
if (settings.get('loop') || $related[index + 1]) {
|
302
|
+
clear();
|
303
|
+
timeOut = setTimeout(publicMethod.next, settings.get('slideshowSpeed'));
|
304
|
+
}
|
305
|
+
}
|
306
|
+
|
307
|
+
function start() {
|
308
|
+
$slideshow
|
309
|
+
.html(settings.get('slideshowStop'))
|
310
|
+
.unbind(click)
|
311
|
+
.one(click, stop);
|
312
|
+
|
313
|
+
$events
|
314
|
+
.bind(event_complete, set)
|
315
|
+
.bind(event_load, clear);
|
316
|
+
|
317
|
+
$box.removeClass(className + "off").addClass(className + "on");
|
318
|
+
}
|
319
|
+
|
320
|
+
function stop() {
|
321
|
+
clear();
|
322
|
+
|
323
|
+
$events
|
324
|
+
.unbind(event_complete, set)
|
325
|
+
.unbind(event_load, clear);
|
326
|
+
|
327
|
+
$slideshow
|
328
|
+
.html(settings.get('slideshowStart'))
|
329
|
+
.unbind(click)
|
330
|
+
.one(click, function () {
|
331
|
+
publicMethod.next();
|
332
|
+
start();
|
333
|
+
});
|
334
|
+
|
335
|
+
$box.removeClass(className + "on").addClass(className + "off");
|
336
|
+
}
|
337
|
+
|
338
|
+
function reset() {
|
339
|
+
active = false;
|
340
|
+
$slideshow.hide();
|
341
|
+
clear();
|
342
|
+
$events
|
343
|
+
.unbind(event_complete, set)
|
344
|
+
.unbind(event_load, clear);
|
345
|
+
$box.removeClass(className + "off " + className + "on");
|
346
|
+
}
|
347
|
+
|
348
|
+
return function(){
|
349
|
+
if (active) {
|
350
|
+
if (!settings.get('slideshow')) {
|
351
|
+
$events.unbind(event_cleanup, reset);
|
352
|
+
reset();
|
353
|
+
}
|
354
|
+
} else {
|
355
|
+
if (settings.get('slideshow') && $related[1]) {
|
356
|
+
active = true;
|
357
|
+
$events.one(event_cleanup, reset);
|
358
|
+
if (settings.get('slideshowAuto')) {
|
359
|
+
start();
|
360
|
+
} else {
|
361
|
+
stop();
|
362
|
+
}
|
363
|
+
$slideshow.show();
|
364
|
+
}
|
365
|
+
}
|
366
|
+
};
|
367
|
+
|
368
|
+
}());
|
369
|
+
|
370
|
+
|
371
|
+
function launch(element) {
|
372
|
+
var options;
|
373
|
+
|
374
|
+
if (!closing) {
|
375
|
+
|
376
|
+
options = $(element).data(colorbox);
|
377
|
+
|
378
|
+
settings = new Settings(element, options);
|
379
|
+
|
380
|
+
getRelated(settings.get('rel'));
|
381
|
+
|
382
|
+
if (!open) {
|
383
|
+
open = active = true; // Prevents the page-change action from queuing up if the visitor holds down the left or right keys.
|
384
|
+
|
385
|
+
setClass(settings.get('className'));
|
386
|
+
|
387
|
+
// Show colorbox so the sizes can be calculated in older versions of jQuery
|
388
|
+
$box.css({visibility:'hidden', display:'block', opacity:''});
|
389
|
+
|
390
|
+
$loaded = $tag(div, 'LoadedContent', 'width:0; height:0; overflow:hidden; visibility:hidden');
|
391
|
+
$content.css({width:'', height:''}).append($loaded);
|
392
|
+
|
393
|
+
// Cache values needed for size calculations
|
394
|
+
interfaceHeight = $topBorder.height() + $bottomBorder.height() + $content.outerHeight(true) - $content.height();
|
395
|
+
interfaceWidth = $leftBorder.width() + $rightBorder.width() + $content.outerWidth(true) - $content.width();
|
396
|
+
loadedHeight = $loaded.outerHeight(true);
|
397
|
+
loadedWidth = $loaded.outerWidth(true);
|
398
|
+
|
399
|
+
// Opens inital empty Colorbox prior to content being loaded.
|
400
|
+
var initialWidth = setSize(settings.get('initialWidth'), 'x');
|
401
|
+
var initialHeight = setSize(settings.get('initialHeight'), 'y');
|
402
|
+
var maxWidth = settings.get('maxWidth');
|
403
|
+
var maxHeight = settings.get('maxHeight');
|
404
|
+
|
405
|
+
settings.w = (maxWidth !== false ? Math.min(initialWidth, setSize(maxWidth, 'x')) : initialWidth) - loadedWidth - interfaceWidth;
|
406
|
+
settings.h = (maxHeight !== false ? Math.min(initialHeight, setSize(maxHeight, 'y')) : initialHeight) - loadedHeight - interfaceHeight;
|
407
|
+
|
408
|
+
$loaded.css({width:'', height:settings.h});
|
409
|
+
publicMethod.position();
|
410
|
+
|
411
|
+
trigger(event_open);
|
412
|
+
settings.get('onOpen');
|
413
|
+
|
414
|
+
$groupControls.add($title).hide();
|
415
|
+
|
416
|
+
$box.focus();
|
417
|
+
|
418
|
+
if (settings.get('trapFocus')) {
|
419
|
+
// Confine focus to the modal
|
420
|
+
// Uses event capturing that is not supported in IE8-
|
421
|
+
if (document.addEventListener) {
|
422
|
+
|
423
|
+
document.addEventListener('focus', trapFocus, true);
|
424
|
+
|
425
|
+
$events.one(event_closed, function () {
|
426
|
+
document.removeEventListener('focus', trapFocus, true);
|
427
|
+
});
|
428
|
+
}
|
429
|
+
}
|
430
|
+
|
431
|
+
// Return focus on closing
|
432
|
+
if (settings.get('returnFocus')) {
|
433
|
+
$events.one(event_closed, function () {
|
434
|
+
$(settings.el).focus();
|
435
|
+
});
|
436
|
+
}
|
437
|
+
}
|
438
|
+
|
439
|
+
var opacity = parseFloat(settings.get('opacity'));
|
440
|
+
$overlay.css({
|
441
|
+
opacity: opacity === opacity ? opacity : '',
|
442
|
+
cursor: settings.get('overlayClose') ? 'pointer' : '',
|
443
|
+
visibility: 'visible'
|
444
|
+
}).show();
|
445
|
+
|
446
|
+
if (settings.get('closeButton')) {
|
447
|
+
$close.html(settings.get('close')).appendTo($content);
|
448
|
+
} else {
|
449
|
+
$close.appendTo('<div/>'); // replace with .detach() when dropping jQuery < 1.4
|
450
|
+
}
|
451
|
+
|
452
|
+
load();
|
453
|
+
}
|
454
|
+
}
|
455
|
+
|
456
|
+
// Colorbox's markup needs to be added to the DOM prior to being called
|
457
|
+
// so that the browser will go ahead and load the CSS background images.
|
458
|
+
function appendHTML() {
|
459
|
+
if (!$box && document.body) {
|
460
|
+
init = false;
|
461
|
+
$window = $(window);
|
462
|
+
$box = $tag(div).attr({
|
463
|
+
id: colorbox,
|
464
|
+
'class': $.support.opacity === false ? prefix + 'IE' : '', // class for optional IE8 & lower targeted CSS.
|
465
|
+
role: 'dialog',
|
466
|
+
tabindex: '-1'
|
467
|
+
}).hide();
|
468
|
+
$overlay = $tag(div, "Overlay").hide();
|
469
|
+
$loadingOverlay = $([$tag(div, "LoadingOverlay")[0],$tag(div, "LoadingGraphic")[0]]);
|
470
|
+
$wrap = $tag(div, "Wrapper");
|
471
|
+
$content = $tag(div, "Content").append(
|
472
|
+
$title = $tag(div, "Title"),
|
473
|
+
$current = $tag(div, "Current"),
|
474
|
+
$prev = $('<button type="button"/>').attr({id:prefix+'Previous'}),
|
475
|
+
$next = $('<button type="button"/>').attr({id:prefix+'Next'}),
|
476
|
+
$slideshow = $tag('button', "Slideshow"),
|
477
|
+
$loadingOverlay
|
478
|
+
);
|
479
|
+
|
480
|
+
$close = $('<button type="button"/>').attr({id:prefix+'Close'});
|
481
|
+
|
482
|
+
$wrap.append( // The 3x3 Grid that makes up Colorbox
|
483
|
+
$tag(div).append(
|
484
|
+
$tag(div, "TopLeft"),
|
485
|
+
$topBorder = $tag(div, "TopCenter"),
|
486
|
+
$tag(div, "TopRight")
|
487
|
+
),
|
488
|
+
$tag(div, false, 'clear:left').append(
|
489
|
+
$leftBorder = $tag(div, "MiddleLeft"),
|
490
|
+
$content,
|
491
|
+
$rightBorder = $tag(div, "MiddleRight")
|
492
|
+
),
|
493
|
+
$tag(div, false, 'clear:left').append(
|
494
|
+
$tag(div, "BottomLeft"),
|
495
|
+
$bottomBorder = $tag(div, "BottomCenter"),
|
496
|
+
$tag(div, "BottomRight")
|
497
|
+
)
|
498
|
+
).find('div div').css({'float': 'left'});
|
499
|
+
|
500
|
+
$loadingBay = $tag(div, false, 'position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;');
|
501
|
+
|
502
|
+
$groupControls = $next.add($prev).add($current).add($slideshow);
|
503
|
+
|
504
|
+
$(document.body).append($overlay, $box.append($wrap, $loadingBay));
|
505
|
+
}
|
506
|
+
}
|
507
|
+
|
508
|
+
// Add Colorbox's event bindings
|
509
|
+
function addBindings() {
|
510
|
+
function clickHandler(e) {
|
511
|
+
// ignore non-left-mouse-clicks and clicks modified with ctrl / command, shift, or alt.
|
512
|
+
// See: http://jacklmoore.com/notes/click-events/
|
513
|
+
if (!(e.which > 1 || e.shiftKey || e.altKey || e.metaKey || e.ctrlKey)) {
|
514
|
+
e.preventDefault();
|
515
|
+
launch(this);
|
516
|
+
}
|
517
|
+
}
|
518
|
+
|
519
|
+
if ($box) {
|
520
|
+
if (!init) {
|
521
|
+
init = true;
|
522
|
+
|
523
|
+
// Anonymous functions here keep the public method from being cached, thereby allowing them to be redefined on the fly.
|
524
|
+
$next.click(function () {
|
525
|
+
publicMethod.next();
|
526
|
+
});
|
527
|
+
$prev.click(function () {
|
528
|
+
publicMethod.prev();
|
529
|
+
});
|
530
|
+
$close.click(function () {
|
531
|
+
publicMethod.close();
|
532
|
+
});
|
533
|
+
$overlay.click(function () {
|
534
|
+
if (settings.get('overlayClose')) {
|
535
|
+
publicMethod.close();
|
536
|
+
}
|
537
|
+
});
|
538
|
+
|
539
|
+
// Key Bindings
|
540
|
+
$(document).bind('keydown.' + prefix, function (e) {
|
541
|
+
var key = e.keyCode;
|
542
|
+
if (open && settings.get('escKey') && key === 27) {
|
543
|
+
e.preventDefault();
|
544
|
+
publicMethod.close();
|
545
|
+
}
|
546
|
+
if (open && settings.get('arrowKey') && $related[1] && !e.altKey) {
|
547
|
+
if (key === 37) {
|
548
|
+
e.preventDefault();
|
549
|
+
$prev.click();
|
550
|
+
} else if (key === 39) {
|
551
|
+
e.preventDefault();
|
552
|
+
$next.click();
|
553
|
+
}
|
554
|
+
}
|
555
|
+
});
|
556
|
+
|
557
|
+
if ($.isFunction($.fn.on)) {
|
558
|
+
// For jQuery 1.7+
|
559
|
+
$(document).on('click.'+prefix, '.'+boxElement, clickHandler);
|
560
|
+
} else {
|
561
|
+
// For jQuery 1.3.x -> 1.6.x
|
562
|
+
// This code is never reached in jQuery 1.9, so do not contact me about 'live' being removed.
|
563
|
+
// This is not here for jQuery 1.9, it's here for legacy users.
|
564
|
+
$('.'+boxElement).live('click.'+prefix, clickHandler);
|
565
|
+
}
|
566
|
+
}
|
567
|
+
return true;
|
568
|
+
}
|
569
|
+
return false;
|
570
|
+
}
|
571
|
+
|
572
|
+
// Don't do anything if Colorbox already exists.
|
573
|
+
if ($[colorbox]) {
|
574
|
+
return;
|
575
|
+
}
|
576
|
+
|
577
|
+
// Append the HTML when the DOM loads
|
578
|
+
$(appendHTML);
|
579
|
+
|
580
|
+
|
581
|
+
// ****************
|
582
|
+
// PUBLIC FUNCTIONS
|
583
|
+
// Usage format: $.colorbox.close();
|
584
|
+
// Usage from within an iframe: parent.jQuery.colorbox.close();
|
585
|
+
// ****************
|
586
|
+
|
587
|
+
publicMethod = $.fn[colorbox] = $[colorbox] = function (options, callback) {
|
588
|
+
var settings;
|
589
|
+
var $obj = this;
|
590
|
+
|
591
|
+
options = options || {};
|
592
|
+
|
593
|
+
if ($.isFunction($obj)) { // assume a call to $.colorbox
|
594
|
+
$obj = $('<a/>');
|
595
|
+
options.open = true;
|
596
|
+
} else if (!$obj[0]) { // colorbox being applied to empty collection
|
597
|
+
return $obj;
|
598
|
+
}
|
599
|
+
|
600
|
+
|
601
|
+
if (!$obj[0]) { // colorbox being applied to empty collection
|
602
|
+
return $obj;
|
603
|
+
}
|
604
|
+
|
605
|
+
appendHTML();
|
606
|
+
|
607
|
+
if (addBindings()) {
|
608
|
+
|
609
|
+
if (callback) {
|
610
|
+
options.onComplete = callback;
|
611
|
+
}
|
612
|
+
|
613
|
+
$obj.each(function () {
|
614
|
+
var old = $.data(this, colorbox) || {};
|
615
|
+
$.data(this, colorbox, $.extend(old, options));
|
616
|
+
}).addClass(boxElement);
|
617
|
+
|
618
|
+
settings = new Settings($obj[0], options);
|
619
|
+
|
620
|
+
if (settings.get('open')) {
|
621
|
+
launch($obj[0]);
|
622
|
+
}
|
623
|
+
}
|
624
|
+
|
625
|
+
return $obj;
|
626
|
+
};
|
627
|
+
|
628
|
+
publicMethod.position = function (speed, loadedCallback) {
|
629
|
+
var
|
630
|
+
css,
|
631
|
+
top = 0,
|
632
|
+
left = 0,
|
633
|
+
offset = $box.offset(),
|
634
|
+
scrollTop,
|
635
|
+
scrollLeft;
|
636
|
+
|
637
|
+
$window.unbind('resize.' + prefix);
|
638
|
+
|
639
|
+
// remove the modal so that it doesn't influence the document width/height
|
640
|
+
$box.css({top: -9e4, left: -9e4});
|
641
|
+
|
642
|
+
scrollTop = $window.scrollTop();
|
643
|
+
scrollLeft = $window.scrollLeft();
|
644
|
+
|
645
|
+
if (settings.get('fixed')) {
|
646
|
+
offset.top -= scrollTop;
|
647
|
+
offset.left -= scrollLeft;
|
648
|
+
$box.css({position: 'fixed'});
|
649
|
+
} else {
|
650
|
+
top = scrollTop;
|
651
|
+
left = scrollLeft;
|
652
|
+
$box.css({position: 'absolute'});
|
653
|
+
}
|
654
|
+
|
655
|
+
// keeps the top and left positions within the browser's viewport.
|
656
|
+
if (settings.get('right') !== false) {
|
657
|
+
left += Math.max($window.width() - settings.w - loadedWidth - interfaceWidth - setSize(settings.get('right'), 'x'), 0);
|
658
|
+
} else if (settings.get('left') !== false) {
|
659
|
+
left += setSize(settings.get('left'), 'x');
|
660
|
+
} else {
|
661
|
+
left += Math.round(Math.max($window.width() - settings.w - loadedWidth - interfaceWidth, 0) / 2);
|
662
|
+
}
|
663
|
+
|
664
|
+
if (settings.get('bottom') !== false) {
|
665
|
+
top += Math.max(winheight() - settings.h - loadedHeight - interfaceHeight - setSize(settings.get('bottom'), 'y'), 0);
|
666
|
+
} else if (settings.get('top') !== false) {
|
667
|
+
top += setSize(settings.get('top'), 'y');
|
668
|
+
} else {
|
669
|
+
top += Math.round(Math.max(winheight() - settings.h - loadedHeight - interfaceHeight, 0) / 2);
|
670
|
+
}
|
671
|
+
|
672
|
+
$box.css({top: offset.top, left: offset.left, visibility:'visible'});
|
673
|
+
|
674
|
+
// this gives the wrapper plenty of breathing room so it's floated contents can move around smoothly,
|
675
|
+
// but it has to be shrank down around the size of div#colorbox when it's done. If not,
|
676
|
+
// it can invoke an obscure IE bug when using iframes.
|
677
|
+
$wrap[0].style.width = $wrap[0].style.height = "9999px";
|
678
|
+
|
679
|
+
function modalDimensions() {
|
680
|
+
$topBorder[0].style.width = $bottomBorder[0].style.width = $content[0].style.width = (parseInt($box[0].style.width,10) - interfaceWidth)+'px';
|
681
|
+
$content[0].style.height = $leftBorder[0].style.height = $rightBorder[0].style.height = (parseInt($box[0].style.height,10) - interfaceHeight)+'px';
|
682
|
+
}
|
683
|
+
|
684
|
+
css = {width: settings.w + loadedWidth + interfaceWidth, height: settings.h + loadedHeight + interfaceHeight, top: top, left: left};
|
685
|
+
|
686
|
+
// setting the speed to 0 if the content hasn't changed size or position
|
687
|
+
if (speed) {
|
688
|
+
var tempSpeed = 0;
|
689
|
+
$.each(css, function(i){
|
690
|
+
if (css[i] !== previousCSS[i]) {
|
691
|
+
tempSpeed = speed;
|
692
|
+
return;
|
693
|
+
}
|
694
|
+
});
|
695
|
+
speed = tempSpeed;
|
696
|
+
}
|
697
|
+
|
698
|
+
previousCSS = css;
|
699
|
+
|
700
|
+
if (!speed) {
|
701
|
+
$box.css(css);
|
702
|
+
}
|
703
|
+
|
704
|
+
$box.dequeue().animate(css, {
|
705
|
+
duration: speed || 0,
|
706
|
+
complete: function () {
|
707
|
+
modalDimensions();
|
708
|
+
|
709
|
+
active = false;
|
710
|
+
|
711
|
+
// shrink the wrapper down to exactly the size of colorbox to avoid a bug in IE's iframe implementation.
|
712
|
+
$wrap[0].style.width = (settings.w + loadedWidth + interfaceWidth) + "px";
|
713
|
+
$wrap[0].style.height = (settings.h + loadedHeight + interfaceHeight) + "px";
|
714
|
+
|
715
|
+
if (settings.get('reposition')) {
|
716
|
+
setTimeout(function () { // small delay before binding onresize due to an IE8 bug.
|
717
|
+
$window.bind('resize.' + prefix, publicMethod.position);
|
718
|
+
}, 1);
|
719
|
+
}
|
720
|
+
|
721
|
+
if ($.isFunction(loadedCallback)) {
|
722
|
+
loadedCallback();
|
723
|
+
}
|
724
|
+
},
|
725
|
+
step: modalDimensions
|
726
|
+
});
|
727
|
+
};
|
728
|
+
|
729
|
+
publicMethod.resize = function (options) {
|
730
|
+
var scrolltop;
|
731
|
+
|
732
|
+
if (open) {
|
733
|
+
options = options || {};
|
734
|
+
|
735
|
+
if (options.width) {
|
736
|
+
settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
|
737
|
+
}
|
738
|
+
|
739
|
+
if (options.innerWidth) {
|
740
|
+
settings.w = setSize(options.innerWidth, 'x');
|
741
|
+
}
|
742
|
+
|
743
|
+
$loaded.css({width: settings.w});
|
744
|
+
|
745
|
+
if (options.height) {
|
746
|
+
settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
|
747
|
+
}
|
748
|
+
|
749
|
+
if (options.innerHeight) {
|
750
|
+
settings.h = setSize(options.innerHeight, 'y');
|
751
|
+
}
|
752
|
+
|
753
|
+
if (!options.innerHeight && !options.height) {
|
754
|
+
scrolltop = $loaded.scrollTop();
|
755
|
+
$loaded.css({height: "auto"});
|
756
|
+
settings.h = $loaded.height();
|
757
|
+
}
|
758
|
+
|
759
|
+
$loaded.css({height: settings.h});
|
760
|
+
|
761
|
+
if(scrolltop) {
|
762
|
+
$loaded.scrollTop(scrolltop);
|
763
|
+
}
|
764
|
+
|
765
|
+
publicMethod.position(settings.get('transition') === "none" ? 0 : settings.get('speed'));
|
766
|
+
}
|
767
|
+
};
|
768
|
+
|
769
|
+
publicMethod.prep = function (object) {
|
770
|
+
if (!open) {
|
771
|
+
return;
|
772
|
+
}
|
773
|
+
|
774
|
+
var callback, speed = settings.get('transition') === "none" ? 0 : settings.get('speed');
|
775
|
+
|
776
|
+
$loaded.remove();
|
777
|
+
|
778
|
+
$loaded = $tag(div, 'LoadedContent').append(object);
|
779
|
+
|
780
|
+
function getWidth() {
|
781
|
+
settings.w = settings.w || $loaded.width();
|
782
|
+
settings.w = settings.mw && settings.mw < settings.w ? settings.mw : settings.w;
|
783
|
+
return settings.w;
|
784
|
+
}
|
785
|
+
function getHeight() {
|
786
|
+
settings.h = settings.h || $loaded.height();
|
787
|
+
settings.h = settings.mh && settings.mh < settings.h ? settings.mh : settings.h;
|
788
|
+
return settings.h;
|
789
|
+
}
|
790
|
+
|
791
|
+
$loaded.hide()
|
792
|
+
.appendTo($loadingBay.show())// content has to be appended to the DOM for accurate size calculations.
|
793
|
+
.css({width: getWidth(), overflow: settings.get('scrolling') ? 'auto' : 'hidden'})
|
794
|
+
.css({height: getHeight()})// sets the height independently from the width in case the new width influences the value of height.
|
795
|
+
.prependTo($content);
|
796
|
+
|
797
|
+
$loadingBay.hide();
|
798
|
+
|
799
|
+
// floating the IMG removes the bottom line-height and fixed a problem where IE miscalculates the width of the parent element as 100% of the document width.
|
800
|
+
|
801
|
+
$(photo).css({'float': 'none'});
|
802
|
+
|
803
|
+
setClass(settings.get('className'));
|
804
|
+
|
805
|
+
callback = function () {
|
806
|
+
var total = $related.length,
|
807
|
+
iframe,
|
808
|
+
complete;
|
809
|
+
|
810
|
+
if (!open) {
|
811
|
+
return;
|
812
|
+
}
|
813
|
+
|
814
|
+
function removeFilter() { // Needed for IE8 in versions of jQuery prior to 1.7.2
|
815
|
+
if ($.support.opacity === false) {
|
816
|
+
$box[0].style.removeAttribute('filter');
|
817
|
+
}
|
818
|
+
}
|
819
|
+
|
820
|
+
complete = function () {
|
821
|
+
clearTimeout(loadingTimer);
|
822
|
+
$loadingOverlay.hide();
|
823
|
+
trigger(event_complete);
|
824
|
+
settings.get('onComplete');
|
825
|
+
};
|
826
|
+
|
827
|
+
|
828
|
+
$title.html(settings.get('title')).show();
|
829
|
+
$loaded.show();
|
830
|
+
|
831
|
+
if (total > 1) { // handle grouping
|
832
|
+
if (typeof settings.get('current') === "string") {
|
833
|
+
$current.html(settings.get('current').replace('{current}', index + 1).replace('{total}', total)).show();
|
834
|
+
}
|
835
|
+
|
836
|
+
$next[(settings.get('loop') || index < total - 1) ? "show" : "hide"]().html(settings.get('next'));
|
837
|
+
$prev[(settings.get('loop') || index) ? "show" : "hide"]().html(settings.get('previous'));
|
838
|
+
|
839
|
+
slideshow();
|
840
|
+
|
841
|
+
// Preloads images within a rel group
|
842
|
+
if (settings.get('preloading')) {
|
843
|
+
$.each([getIndex(-1), getIndex(1)], function(){
|
844
|
+
var img,
|
845
|
+
i = $related[this],
|
846
|
+
settings = new Settings(i, $.data(i, colorbox)),
|
847
|
+
src = settings.get('href');
|
848
|
+
|
849
|
+
if (src && isImage(settings, src)) {
|
850
|
+
src = retinaUrl(settings, src);
|
851
|
+
img = document.createElement('img');
|
852
|
+
img.src = src;
|
853
|
+
}
|
854
|
+
});
|
855
|
+
}
|
856
|
+
} else {
|
857
|
+
$groupControls.hide();
|
858
|
+
}
|
859
|
+
|
860
|
+
if (settings.get('iframe')) {
|
861
|
+
iframe = document.createElement('iframe');
|
862
|
+
|
863
|
+
if ('frameBorder' in iframe) {
|
864
|
+
iframe.frameBorder = 0;
|
865
|
+
}
|
866
|
+
|
867
|
+
if ('allowTransparency' in iframe) {
|
868
|
+
iframe.allowTransparency = "true";
|
869
|
+
}
|
870
|
+
|
871
|
+
if (!settings.get('scrolling')) {
|
872
|
+
iframe.scrolling = "no";
|
873
|
+
}
|
874
|
+
|
875
|
+
$(iframe)
|
876
|
+
.attr({
|
877
|
+
src: settings.get('href'),
|
878
|
+
name: (new Date()).getTime(), // give the iframe a unique name to prevent caching
|
879
|
+
'class': prefix + 'Iframe',
|
880
|
+
allowFullScreen : true // allow HTML5 video to go fullscreen
|
881
|
+
})
|
882
|
+
.one('load', complete)
|
883
|
+
.appendTo($loaded);
|
884
|
+
|
885
|
+
$events.one(event_purge, function () {
|
886
|
+
iframe.src = "//about:blank";
|
887
|
+
});
|
888
|
+
|
889
|
+
if (settings.get('fastIframe')) {
|
890
|
+
$(iframe).trigger('load');
|
891
|
+
}
|
892
|
+
} else {
|
893
|
+
complete();
|
894
|
+
}
|
895
|
+
|
896
|
+
if (settings.get('transition') === 'fade') {
|
897
|
+
$box.fadeTo(speed, 1, removeFilter);
|
898
|
+
} else {
|
899
|
+
removeFilter();
|
900
|
+
}
|
901
|
+
};
|
902
|
+
|
903
|
+
if (settings.get('transition') === 'fade') {
|
904
|
+
$box.fadeTo(speed, 0, function () {
|
905
|
+
publicMethod.position(0, callback);
|
906
|
+
});
|
907
|
+
} else {
|
908
|
+
publicMethod.position(speed, callback);
|
909
|
+
}
|
910
|
+
};
|
911
|
+
|
912
|
+
function load () {
|
913
|
+
var href, setResize, prep = publicMethod.prep, $inline, request = ++requests;
|
914
|
+
|
915
|
+
active = true;
|
916
|
+
|
917
|
+
photo = false;
|
918
|
+
|
919
|
+
trigger(event_purge);
|
920
|
+
trigger(event_load);
|
921
|
+
settings.get('onLoad');
|
922
|
+
|
923
|
+
settings.h = settings.get('height') ?
|
924
|
+
setSize(settings.get('height'), 'y') - loadedHeight - interfaceHeight :
|
925
|
+
settings.get('innerHeight') && setSize(settings.get('innerHeight'), 'y');
|
926
|
+
|
927
|
+
settings.w = settings.get('width') ?
|
928
|
+
setSize(settings.get('width'), 'x') - loadedWidth - interfaceWidth :
|
929
|
+
settings.get('innerWidth') && setSize(settings.get('innerWidth'), 'x');
|
930
|
+
|
931
|
+
// Sets the minimum dimensions for use in image scaling
|
932
|
+
settings.mw = settings.w;
|
933
|
+
settings.mh = settings.h;
|
934
|
+
|
935
|
+
// Re-evaluate the minimum width and height based on maxWidth and maxHeight values.
|
936
|
+
// If the width or height exceed the maxWidth or maxHeight, use the maximum values instead.
|
937
|
+
if (settings.get('maxWidth')) {
|
938
|
+
settings.mw = setSize(settings.get('maxWidth'), 'x') - loadedWidth - interfaceWidth;
|
939
|
+
settings.mw = settings.w && settings.w < settings.mw ? settings.w : settings.mw;
|
940
|
+
}
|
941
|
+
if (settings.get('maxHeight')) {
|
942
|
+
settings.mh = setSize(settings.get('maxHeight'), 'y') - loadedHeight - interfaceHeight;
|
943
|
+
settings.mh = settings.h && settings.h < settings.mh ? settings.h : settings.mh;
|
944
|
+
}
|
945
|
+
|
946
|
+
href = settings.get('href');
|
947
|
+
|
948
|
+
loadingTimer = setTimeout(function () {
|
949
|
+
$loadingOverlay.show();
|
950
|
+
}, 100);
|
951
|
+
|
952
|
+
if (settings.get('inline')) {
|
953
|
+
var $target = $(href);
|
954
|
+
// Inserts an empty placeholder where inline content is being pulled from.
|
955
|
+
// An event is bound to put inline content back when Colorbox closes or loads new content.
|
956
|
+
$inline = $('<div>').hide().insertBefore($target);
|
957
|
+
|
958
|
+
$events.one(event_purge, function () {
|
959
|
+
$inline.replaceWith($target);
|
960
|
+
});
|
961
|
+
|
962
|
+
prep($target);
|
963
|
+
} else if (settings.get('iframe')) {
|
964
|
+
// IFrame element won't be added to the DOM until it is ready to be displayed,
|
965
|
+
// to avoid problems with DOM-ready JS that might be trying to run in that iframe.
|
966
|
+
prep(" ");
|
967
|
+
} else if (settings.get('html')) {
|
968
|
+
prep(settings.get('html'));
|
969
|
+
} else if (isImage(settings, href)) {
|
970
|
+
|
971
|
+
href = retinaUrl(settings, href);
|
972
|
+
|
973
|
+
photo = new Image();
|
974
|
+
|
975
|
+
$(photo)
|
976
|
+
.addClass(prefix + 'Photo')
|
977
|
+
.bind('error',function () {
|
978
|
+
prep($tag(div, 'Error').html(settings.get('imgError')));
|
979
|
+
})
|
980
|
+
.one('load', function () {
|
981
|
+
if (request !== requests) {
|
982
|
+
return;
|
983
|
+
}
|
984
|
+
|
985
|
+
// A small pause because some browsers will occassionaly report a
|
986
|
+
// img.width and img.height of zero immediately after the img.onload fires
|
987
|
+
setTimeout(function(){
|
988
|
+
var percent;
|
989
|
+
|
990
|
+
$.each(['alt', 'longdesc', 'aria-describedby'], function(i,val){
|
991
|
+
var attr = $(settings.el).attr(val) || $(settings.el).attr('data-'+val);
|
992
|
+
if (attr) {
|
993
|
+
photo.setAttribute(val, attr);
|
994
|
+
}
|
995
|
+
});
|
996
|
+
|
997
|
+
if (settings.get('retinaImage') && window.devicePixelRatio > 1) {
|
998
|
+
photo.height = photo.height / window.devicePixelRatio;
|
999
|
+
photo.width = photo.width / window.devicePixelRatio;
|
1000
|
+
}
|
1001
|
+
|
1002
|
+
if (settings.get('scalePhotos')) {
|
1003
|
+
setResize = function () {
|
1004
|
+
photo.height -= photo.height * percent;
|
1005
|
+
photo.width -= photo.width * percent;
|
1006
|
+
};
|
1007
|
+
if (settings.mw && photo.width > settings.mw) {
|
1008
|
+
percent = (photo.width - settings.mw) / photo.width;
|
1009
|
+
setResize();
|
1010
|
+
}
|
1011
|
+
if (settings.mh && photo.height > settings.mh) {
|
1012
|
+
percent = (photo.height - settings.mh) / photo.height;
|
1013
|
+
setResize();
|
1014
|
+
}
|
1015
|
+
}
|
1016
|
+
|
1017
|
+
if (settings.h) {
|
1018
|
+
photo.style.marginTop = Math.max(settings.mh - photo.height, 0) / 2 + 'px';
|
1019
|
+
}
|
1020
|
+
|
1021
|
+
if ($related[1] && (settings.get('loop') || $related[index + 1])) {
|
1022
|
+
photo.style.cursor = 'pointer';
|
1023
|
+
photo.onclick = function () {
|
1024
|
+
publicMethod.next();
|
1025
|
+
};
|
1026
|
+
}
|
1027
|
+
|
1028
|
+
photo.style.width = photo.width + 'px';
|
1029
|
+
photo.style.height = photo.height + 'px';
|
1030
|
+
prep(photo);
|
1031
|
+
}, 1);
|
1032
|
+
});
|
1033
|
+
|
1034
|
+
photo.src = href;
|
1035
|
+
|
1036
|
+
} else if (href) {
|
1037
|
+
$loadingBay.load(href, settings.get('data'), function (data, status) {
|
1038
|
+
if (request === requests) {
|
1039
|
+
prep(status === 'error' ? $tag(div, 'Error').html(settings.get('xhrError')) : $(this).contents());
|
1040
|
+
}
|
1041
|
+
});
|
1042
|
+
}
|
1043
|
+
}
|
1044
|
+
|
1045
|
+
// Navigates to the next page/image in a set.
|
1046
|
+
publicMethod.next = function () {
|
1047
|
+
if (!active && $related[1] && (settings.get('loop') || $related[index + 1])) {
|
1048
|
+
index = getIndex(1);
|
1049
|
+
launch($related[index]);
|
1050
|
+
}
|
1051
|
+
};
|
1052
|
+
|
1053
|
+
publicMethod.prev = function () {
|
1054
|
+
if (!active && $related[1] && (settings.get('loop') || index)) {
|
1055
|
+
index = getIndex(-1);
|
1056
|
+
launch($related[index]);
|
1057
|
+
}
|
1058
|
+
};
|
1059
|
+
|
1060
|
+
// Note: to use this within an iframe use the following format: parent.jQuery.colorbox.close();
|
1061
|
+
publicMethod.close = function () {
|
1062
|
+
if (open && !closing) {
|
1063
|
+
|
1064
|
+
closing = true;
|
1065
|
+
open = false;
|
1066
|
+
trigger(event_cleanup);
|
1067
|
+
settings.get('onCleanup');
|
1068
|
+
$window.unbind('.' + prefix);
|
1069
|
+
$overlay.fadeTo(settings.get('fadeOut') || 0, 0);
|
1070
|
+
|
1071
|
+
$box.stop().fadeTo(settings.get('fadeOut') || 0, 0, function () {
|
1072
|
+
$box.hide();
|
1073
|
+
$overlay.hide();
|
1074
|
+
trigger(event_purge);
|
1075
|
+
$loaded.remove();
|
1076
|
+
|
1077
|
+
setTimeout(function () {
|
1078
|
+
closing = false;
|
1079
|
+
trigger(event_closed);
|
1080
|
+
settings.get('onClosed');
|
1081
|
+
}, 1);
|
1082
|
+
});
|
1083
|
+
}
|
1084
|
+
};
|
1085
|
+
|
1086
|
+
// Removes changes Colorbox made to the document, but does not remove the plugin.
|
1087
|
+
publicMethod.remove = function () {
|
1088
|
+
if (!$box) { return; }
|
1089
|
+
|
1090
|
+
$box.stop();
|
1091
|
+
$[colorbox].close();
|
1092
|
+
$box.stop(false, true).remove();
|
1093
|
+
$overlay.remove();
|
1094
|
+
closing = false;
|
1095
|
+
$box = null;
|
1096
|
+
$('.' + boxElement)
|
1097
|
+
.removeData(colorbox)
|
1098
|
+
.removeClass(boxElement);
|
1099
|
+
|
1100
|
+
$(document).unbind('click.'+prefix).unbind('keydown.'+prefix);
|
1101
|
+
};
|
1102
|
+
|
1103
|
+
// A method for fetching the current element Colorbox is referencing.
|
1104
|
+
// returns a jQuery object.
|
1105
|
+
publicMethod.element = function () {
|
1106
|
+
return $(settings.el);
|
1107
|
+
};
|
1108
|
+
|
1109
|
+
publicMethod.settings = defaults;
|
1110
|
+
|
1111
|
+
}(jQuery, document, window));
|
21
1112
|
/*
|
22
1113
|
* File: jquery.dataTables.min.js
|
23
1114
|
* Version: 1.7.0
|
@@ -171,51 +1262,6 @@ jQuery.fn.dataTableExt.oSort['percent-desc'] = function(a,b) {
|
|
171
1262
|
y = parseFloat( y );
|
172
1263
|
return ((x < y) ? 1 : ((x > y) ? -1 : 0));
|
173
1264
|
};
|
174
|
-
/*
|
175
|
-
* FancyBox - jQuery Plugin
|
176
|
-
* Simple and fancy lightbox alternative
|
177
|
-
*
|
178
|
-
* Examples and documentation at: http://fancybox.net
|
179
|
-
*
|
180
|
-
* Copyright (c) 2008 - 2010 Janis Skarnelis
|
181
|
-
*
|
182
|
-
* Version: 1.3.1 (05/03/2010)
|
183
|
-
* Requires: jQuery v1.3+
|
184
|
-
*
|
185
|
-
* Dual licensed under the MIT and GPL licenses:
|
186
|
-
* http://www.opensource.org/licenses/mit-license.php
|
187
|
-
* http://www.gnu.org/licenses/gpl.html
|
188
|
-
*/
|
189
|
-
|
190
|
-
|
191
|
-
(function(b){var m,u,x,g,D,i,z,A,B,p=0,e={},q=[],n=0,c={},j=[],E=null,s=new Image,G=/\.(jpg|gif|png|bmp|jpeg)(.*)?$/i,S=/[^\.]\.(swf)\s*$/i,H,I=1,k,l,h=false,y=b.extend(b("<div/>")[0],{prop:0}),v=0,O=!b.support.opacity&&!window.XMLHttpRequest,J=function(){u.hide();s.onerror=s.onload=null;E&&E.abort();m.empty()},P=function(){b.fancybox('<p id="fancybox_error">The requested content cannot be loaded.<br />Please try again later.</p>',{scrolling:"no",padding:20,transitionIn:"none",transitionOut:"none"})},
|
192
|
-
K=function(){return[b(window).width(),b(window).height(),b(document).scrollLeft(),b(document).scrollTop()]},T=function(){var a=K(),d={},f=c.margin,o=c.autoScale,t=(20+f)*2,w=(20+f)*2,r=c.padding*2;if(c.width.toString().indexOf("%")>-1){d.width=a[0]*parseFloat(c.width)/100-40;o=false}else d.width=c.width+r;if(c.height.toString().indexOf("%")>-1){d.height=a[1]*parseFloat(c.height)/100-40;o=false}else d.height=c.height+r;if(o&&(d.width>a[0]-t||d.height>a[1]-w))if(e.type=="image"||e.type=="swf"){t+=r;
|
193
|
-
w+=r;o=Math.min(Math.min(a[0]-t,c.width)/c.width,Math.min(a[1]-w,c.height)/c.height);d.width=Math.round(o*(d.width-r))+r;d.height=Math.round(o*(d.height-r))+r}else{d.width=Math.min(d.width,a[0]-t);d.height=Math.min(d.height,a[1]-w)}d.top=a[3]+(a[1]-(d.height+40))*0.5;d.left=a[2]+(a[0]-(d.width+40))*0.5;if(c.autoScale===false){d.top=Math.max(a[3]+f,d.top);d.left=Math.max(a[2]+f,d.left)}return d},U=function(a){if(a&&a.length)switch(c.titlePosition){case "inside":return a;case "over":return'<span id="fancybox-title-over">'+
|
194
|
-
a+"</span>";default:return'<span id="fancybox-title-wrap"><span id="fancybox-title-left"></span><span id="fancybox-title-main">'+a+'</span><span id="fancybox-title-right"></span></span>'}return false},V=function(){var a=c.title,d=l.width-c.padding*2,f="fancybox-title-"+c.titlePosition;b("#fancybox-title").remove();v=0;if(c.titleShow!==false){a=b.isFunction(c.titleFormat)?c.titleFormat(a,j,n,c):U(a);if(!(!a||a==="")){b('<div id="fancybox-title" class="'+f+'" />').css({width:d,paddingLeft:c.padding,
|
195
|
-
paddingRight:c.padding}).html(a).appendTo("body");switch(c.titlePosition){case "inside":v=b("#fancybox-title").outerHeight(true)-c.padding;l.height+=v;break;case "over":b("#fancybox-title").css("bottom",c.padding);break;default:b("#fancybox-title").css("bottom",b("#fancybox-title").outerHeight(true)*-1);break}b("#fancybox-title").appendTo(D).hide()}}},W=function(){b(document).unbind("keydown.fb").bind("keydown.fb",function(a){if(a.keyCode==27&&c.enableEscapeButton){a.preventDefault();b.fancybox.close()}else if(a.keyCode==
|
196
|
-
37){a.preventDefault();b.fancybox.prev()}else if(a.keyCode==39){a.preventDefault();b.fancybox.next()}});if(b.fn.mousewheel){g.unbind("mousewheel.fb");j.length>1&&g.bind("mousewheel.fb",function(a,d){a.preventDefault();h||d===0||(d>0?b.fancybox.prev():b.fancybox.next())})}if(c.showNavArrows){if(c.cyclic&&j.length>1||n!==0)A.show();if(c.cyclic&&j.length>1||n!=j.length-1)B.show()}},X=function(){var a,d;if(j.length-1>n){a=j[n+1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}if(n>0){a=
|
197
|
-
j[n-1].href;if(typeof a!=="undefined"&&a.match(G)){d=new Image;d.src=a}}},L=function(){i.css("overflow",c.scrolling=="auto"?c.type=="image"||c.type=="iframe"||c.type=="swf"?"hidden":"auto":c.scrolling=="yes"?"auto":"visible");if(!b.support.opacity){i.get(0).style.removeAttribute("filter");g.get(0).style.removeAttribute("filter")}b("#fancybox-title").show();c.hideOnContentClick&&i.one("click",b.fancybox.close);c.hideOnOverlayClick&&x.one("click",b.fancybox.close);c.showCloseButton&&z.show();W();b(window).bind("resize.fb",
|
198
|
-
b.fancybox.center);c.centerOnScroll?b(window).bind("scroll.fb",b.fancybox.center):b(window).unbind("scroll.fb");b.isFunction(c.onComplete)&&c.onComplete(j,n,c);h=false;X()},M=function(a){var d=Math.round(k.width+(l.width-k.width)*a),f=Math.round(k.height+(l.height-k.height)*a),o=Math.round(k.top+(l.top-k.top)*a),t=Math.round(k.left+(l.left-k.left)*a);g.css({width:d+"px",height:f+"px",top:o+"px",left:t+"px"});d=Math.max(d-c.padding*2,0);f=Math.max(f-(c.padding*2+v*a),0);i.css({width:d+"px",height:f+
|
199
|
-
"px"});if(typeof l.opacity!=="undefined")g.css("opacity",a<0.5?0.5:a)},Y=function(a){var d=a.offset();d.top+=parseFloat(a.css("paddingTop"))||0;d.left+=parseFloat(a.css("paddingLeft"))||0;d.top+=parseFloat(a.css("border-top-width"))||0;d.left+=parseFloat(a.css("border-left-width"))||0;d.width=a.width();d.height=a.height();return d},Q=function(){var a=e.orig?b(e.orig):false,d={};if(a&&a.length){a=Y(a);d={width:a.width+c.padding*2,height:a.height+c.padding*2,top:a.top-c.padding-20,left:a.left-c.padding-
|
200
|
-
20}}else{a=K();d={width:1,height:1,top:a[3]+a[1]*0.5,left:a[2]+a[0]*0.5}}return d},N=function(){u.hide();if(g.is(":visible")&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){b.event.trigger("fancybox-cancel");h=false;return}j=q;n=p;c=e;i.get(0).scrollTop=0;i.get(0).scrollLeft=0;if(c.overlayShow){O&&b("select:not(#fancybox-tmp select)").filter(function(){return this.style.visibility!=="hidden"}).css({visibility:"hidden"}).one("fancybox-cleanup",function(){this.style.visibility="inherit"});
|
201
|
-
x.css({"background-color":c.overlayColor,opacity:c.overlayOpacity}).unbind().show()}l=T();V();if(g.is(":visible")){b(z.add(A).add(B)).hide();var a=g.position(),d;k={top:a.top,left:a.left,width:g.width(),height:g.height()};d=k.width==l.width&&k.height==l.height;i.fadeOut(c.changeFade,function(){var f=function(){i.html(m.contents()).fadeIn(c.changeFade,L)};b.event.trigger("fancybox-change");i.empty().css("overflow","hidden");if(d){i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*
|
202
|
-
2,1),height:Math.max(l.height-c.padding*2-v,1)});f()}else{i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)});y.prop=0;b(y).animate({prop:1},{duration:c.changeSpeed,easing:c.easingChange,step:M,complete:f})}})}else{g.css("opacity",1);if(c.transitionIn=="elastic"){k=Q();i.css({top:c.padding,left:c.padding,width:Math.max(k.width-c.padding*2,1),height:Math.max(k.height-c.padding*2,1)}).html(m.contents());g.css(k).show();if(c.opacity)l.opacity=
|
203
|
-
0;y.prop=0;b(y).animate({prop:1},{duration:c.speedIn,easing:c.easingIn,step:M,complete:L})}else{i.css({top:c.padding,left:c.padding,width:Math.max(l.width-c.padding*2,1),height:Math.max(l.height-c.padding*2-v,1)}).html(m.contents());g.css(l).fadeIn(c.transitionIn=="none"?0:c.speedIn,L)}}},F=function(){m.width(e.width);m.height(e.height);if(e.width=="auto")e.width=m.width();if(e.height=="auto")e.height=m.height();N()},Z=function(){h=true;e.width=s.width;e.height=s.height;b("<img />").attr({id:"fancybox-img",
|
204
|
-
src:s.src,alt:e.title}).appendTo(m);N()},C=function(){J();var a=q[p],d,f,o,t,w;e=b.extend({},b.fn.fancybox.defaults,typeof b(a).data("fancybox")=="undefined"?e:b(a).data("fancybox"));o=a.title||b(a).title||e.title||"";if(a.nodeName&&!e.orig)e.orig=b(a).children("img:first").length?b(a).children("img:first"):b(a);if(o===""&&e.orig)o=e.orig.attr("alt");d=a.nodeName&&/^(?:javascript|#)/i.test(a.href)?e.href||null:e.href||a.href||null;if(e.type){f=e.type;if(!d)d=e.content}else if(e.content)f="html";else if(d)if(d.match(G))f=
|
205
|
-
"image";else if(d.match(S))f="swf";else if(b(a).hasClass("iframe"))f="iframe";else if(d.match(/#/)){a=d.substr(d.indexOf("#"));f=b(a).length>0?"inline":"ajax"}else f="ajax";else f="inline";e.type=f;e.href=d;e.title=o;if(e.autoDimensions&&e.type!=="iframe"&&e.type!=="swf"){e.width="auto";e.height="auto"}if(e.modal){e.overlayShow=true;e.hideOnOverlayClick=false;e.hideOnContentClick=false;e.enableEscapeButton=false;e.showCloseButton=false}if(b.isFunction(e.onStart))if(e.onStart(q,p,e)===false){h=false;
|
206
|
-
return}m.css("padding",20+e.padding+e.margin);b(".fancybox-inline-tmp").unbind("fancybox-cancel").bind("fancybox-change",function(){b(this).replaceWith(i.children())});switch(f){case "html":m.html(e.content);F();break;case "inline":b('<div class="fancybox-inline-tmp" />').hide().insertBefore(b(a)).bind("fancybox-cleanup",function(){b(this).replaceWith(i.children())}).bind("fancybox-cancel",function(){b(this).replaceWith(m.children())});b(a).appendTo(m);F();break;case "image":h=false;b.fancybox.showActivity();
|
207
|
-
s=new Image;s.onerror=function(){P()};s.onload=function(){s.onerror=null;s.onload=null;Z()};s.src=d;break;case "swf":t='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+e.width+'" height="'+e.height+'"><param name="movie" value="'+d+'"></param>';w="";b.each(e.swf,function(r,R){t+='<param name="'+r+'" value="'+R+'"></param>';w+=" "+r+'="'+R+'"'});t+='<embed src="'+d+'" type="application/x-shockwave-flash" width="'+e.width+'" height="'+e.height+'"'+w+"></embed></object>";m.html(t);
|
208
|
-
F();break;case "ajax":a=d.split("#",2);f=e.ajax.data||{};if(a.length>1){d=a[0];if(typeof f=="string")f+="&selector="+a[1];else f.selector=a[1]}h=false;b.fancybox.showActivity();E=b.ajax(b.extend(e.ajax,{url:d,data:f,error:P,success:function(r){if(E.status==200){m.html(r);F()}}}));break;case "iframe":b('<iframe id="fancybox-frame" name="fancybox-frame'+(new Date).getTime()+'" frameborder="0" hspace="0" scrolling="'+e.scrolling+'" src="'+e.href+'"></iframe>').appendTo(m);N();break}},$=function(){if(u.is(":visible")){b("div",
|
209
|
-
u).css("top",I*-40+"px");I=(I+1)%12}else clearInterval(H)},aa=function(){if(!b("#fancybox-wrap").length){b("body").append(m=b('<div id="fancybox-tmp"></div>'),u=b('<div id="fancybox-loading"><div></div></div>'),x=b('<div id="fancybox-overlay"></div>'),g=b('<div id="fancybox-wrap"></div>'));if(!b.support.opacity){g.addClass("fancybox-ie");u.addClass("fancybox-ie")}D=b('<div id="fancybox-outer"></div>').append('<div class="fancy-bg" id="fancy-bg-n"></div><div class="fancy-bg" id="fancy-bg-ne"></div><div class="fancy-bg" id="fancy-bg-e"></div><div class="fancy-bg" id="fancy-bg-se"></div><div class="fancy-bg" id="fancy-bg-s"></div><div class="fancy-bg" id="fancy-bg-sw"></div><div class="fancy-bg" id="fancy-bg-w"></div><div class="fancy-bg" id="fancy-bg-nw"></div>').appendTo(g);
|
210
|
-
D.append(i=b('<div id="fancybox-inner"></div>'),z=b('<a id="fancybox-close"></a>'),A=b('<a href="javascript:;" id="fancybox-left"><span class="fancy-ico" id="fancybox-left-ico"></span></a>'),B=b('<a href="javascript:;" id="fancybox-right"><span class="fancy-ico" id="fancybox-right-ico"></span></a>'));z.click(b.fancybox.close);u.click(b.fancybox.cancel);A.click(function(a){a.preventDefault();b.fancybox.prev()});B.click(function(a){a.preventDefault();b.fancybox.next()});if(O){x.get(0).style.setExpression("height",
|
211
|
-
"document.body.scrollHeight > document.body.offsetHeight ? document.body.scrollHeight : document.body.offsetHeight + 'px'");u.get(0).style.setExpression("top","(-20 + (document.documentElement.clientHeight ? document.documentElement.clientHeight/2 : document.body.clientHeight/2 ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop )) + 'px'");D.prepend('<iframe id="fancybox-hide-sel-frame" src="javascript:\'\';" scrolling="no" frameborder="0" ></iframe>')}}};
|
212
|
-
b.fn.fancybox=function(a){b(this).data("fancybox",b.extend({},a,b.metadata?b(this).metadata():{})).unbind("click.fb").bind("click.fb",function(d){d.preventDefault();if(!h){h=true;b(this).blur();q=[];p=0;d=b(this).attr("rel")||"";if(!d||d==""||d==="nofollow")q.push(this);else{q=b("a[rel="+d+"], area[rel="+d+"]");p=q.index(this)}C();return false}});return this};b.fancybox=function(a,d){if(!h){h=true;d=typeof d!=="undefined"?d:{};q=[];p=d.index||0;if(b.isArray(a)){for(var f=0,o=a.length;f<o;f++)if(typeof a[f]==
|
213
|
-
"object")b(a[f]).data("fancybox",b.extend({},d,a[f]));else a[f]=b({}).data("fancybox",b.extend({content:a[f]},d));q=jQuery.merge(q,a)}else{if(typeof a=="object")b(a).data("fancybox",b.extend({},d,a));else a=b({}).data("fancybox",b.extend({content:a},d));q.push(a)}if(p>q.length||p<0)p=0;C()}};b.fancybox.showActivity=function(){clearInterval(H);u.show();H=setInterval($,66)};b.fancybox.hideActivity=function(){u.hide()};b.fancybox.next=function(){return b.fancybox.pos(n+1)};b.fancybox.prev=function(){return b.fancybox.pos(n-
|
214
|
-
1)};b.fancybox.pos=function(a){if(!h){a=parseInt(a,10);if(a>-1&&j.length>a){p=a;C()}if(c.cyclic&&j.length>1&&a<0){p=j.length-1;C()}if(c.cyclic&&j.length>1&&a>=j.length){p=0;C()}}};b.fancybox.cancel=function(){if(!h){h=true;b.event.trigger("fancybox-cancel");J();e&&b.isFunction(e.onCancel)&&e.onCancel(q,p,e);h=false}};b.fancybox.close=function(){function a(){x.fadeOut("fast");g.hide();b.event.trigger("fancybox-cleanup");i.empty();b.isFunction(c.onClosed)&&c.onClosed(j,n,c);j=e=[];n=p=0;c=e={};h=false}
|
215
|
-
if(!(h||g.is(":hidden"))){h=true;if(c&&b.isFunction(c.onCleanup))if(c.onCleanup(j,n,c)===false){h=false;return}J();b(z.add(A).add(B)).hide();b("#fancybox-title").remove();g.add(i).add(x).unbind();b(window).unbind("resize.fb scroll.fb");b(document).unbind("keydown.fb");i.css("overflow","hidden");if(c.transitionOut=="elastic"){k=Q();var d=g.position();l={top:d.top,left:d.left,width:g.width(),height:g.height()};if(c.opacity)l.opacity=1;y.prop=1;b(y).animate({prop:0},{duration:c.speedOut,easing:c.easingOut,
|
216
|
-
step:M,complete:a})}else g.fadeOut(c.transitionOut=="none"?0:c.speedOut,a)}};b.fancybox.resize=function(){var a,d;if(!(h||g.is(":hidden"))){h=true;a=i.wrapInner("<div style='overflow:auto'></div>").children();d=a.height();g.css({height:d+c.padding*2+v});i.css({height:d});a.replaceWith(a.children());b.fancybox.center()}};b.fancybox.center=function(){h=true;var a=K(),d=c.margin,f={};f.top=a[3]+(a[1]-(g.height()-v+40))*0.5;f.left=a[2]+(a[0]-(g.width()+40))*0.5;f.top=Math.max(a[3]+d,f.top);f.left=Math.max(a[2]+
|
217
|
-
d,f.left);g.css(f);h=false};b.fn.fancybox.defaults={padding:10,margin:20,opacity:false,modal:false,cyclic:false,scrolling:"auto",width:560,height:340,autoScale:true,autoDimensions:true,centerOnScroll:false,ajax:{},swf:{wmode:"transparent"},hideOnOverlayClick:true,hideOnContentClick:false,overlayShow:true,overlayOpacity:0.3,overlayColor:"#666",titleShow:true,titlePosition:"outside",titleFormat:null,transitionIn:"fade",transitionOut:"fade",speedIn:300,speedOut:300,changeSpeed:300,changeFade:"fast",
|
218
|
-
easingIn:"swing",easingOut:"swing",showCloseButton:true,showNavArrows:true,enableEscapeButton:true,onStart:null,onCancel:null,onComplete:null,onCleanup:null,onClosed:null};b(document).ready(function(){aa()})})(jQuery);
|
219
1265
|
/*
|
220
1266
|
* timeago: a jQuery plugin, version: 0.9 (2010-06-21)
|
221
1267
|
* @requires jQuery v1.2.3 or later
|
@@ -543,60 +1589,90 @@ $(document).ready(function() {
|
|
543
1589
|
"bPaginate": false,
|
544
1590
|
"bJQueryUI": true,
|
545
1591
|
"aoColumns": [
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
1592
|
+
null,
|
1593
|
+
{ "sType": "percent" },
|
1594
|
+
null,
|
1595
|
+
null,
|
1596
|
+
null,
|
1597
|
+
null,
|
552
1598
|
null
|
553
|
-
|
1599
|
+
]
|
554
1600
|
});
|
555
|
-
|
1601
|
+
|
556
1602
|
// Syntax highlight all files up front - deactivated
|
557
1603
|
// $('.source_table pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
|
558
|
-
|
1604
|
+
|
559
1605
|
// Syntax highlight source files on first toggle of the file view popup
|
560
1606
|
$("a.src_link").click(function() {
|
561
1607
|
// Get the source file element that corresponds to the clicked element
|
562
1608
|
var source_table = $($(this).attr('href'));
|
563
|
-
|
1609
|
+
|
564
1610
|
// If not highlighted yet, do it!
|
565
1611
|
if (!source_table.hasClass('highlighted')) {
|
566
1612
|
source_table.find('pre code').each(function(i, e) {hljs.highlightBlock(e, ' ')});
|
567
1613
|
source_table.addClass('highlighted');
|
568
1614
|
};
|
569
1615
|
});
|
570
|
-
|
1616
|
+
|
1617
|
+
var prev_anchor;
|
1618
|
+
var curr_anchor;
|
1619
|
+
|
571
1620
|
// Set-up of popup for source file views
|
572
|
-
$("a.src_link").
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
1621
|
+
$("a.src_link").colorbox({
|
1622
|
+
transition: "none",
|
1623
|
+
inline: true,
|
1624
|
+
opacity: 1,
|
1625
|
+
width: "95%",
|
1626
|
+
height: "95%",
|
1627
|
+
onLoad: function() {
|
1628
|
+
prev_anchor = curr_anchor ? curr_anchor : jQuery.url.attr('anchor');
|
1629
|
+
curr_anchor = this.href.split('#')[1];
|
1630
|
+
window.location.hash = curr_anchor;
|
1631
|
+
},
|
1632
|
+
onCleanup: function() {
|
1633
|
+
if (prev_anchor && prev_anchor != curr_anchor) {
|
1634
|
+
$('a[href="#'+prev_anchor+'"]').click();
|
1635
|
+
curr_anchor = prev_anchor;
|
1636
|
+
} else {
|
1637
|
+
$('.group_tabs a:first').click();
|
1638
|
+
prev_anchor = curr_anchor;
|
1639
|
+
curr_anchor = "#_AllFiles";
|
1640
|
+
}
|
1641
|
+
window.location.hash = curr_anchor;
|
1642
|
+
}
|
578
1643
|
});
|
579
|
-
|
580
|
-
|
1644
|
+
|
1645
|
+
window.onpopstate = function(event){
|
1646
|
+
if (location.hash.substring(0,2) == "#_") {
|
1647
|
+
$.colorbox.close();
|
1648
|
+
curr_anchor = jQuery.url.attr('anchor');
|
1649
|
+
} else {
|
1650
|
+
if ($('#colorbox').is(':hidden')) {
|
1651
|
+
$('a.src_link[href="'+location.hash+'"]').colorbox({ open: true });
|
1652
|
+
}
|
1653
|
+
}
|
1654
|
+
};
|
1655
|
+
|
1656
|
+
// Hide src files and file list container after load
|
581
1657
|
$('.source_files').hide();
|
582
1658
|
$('.file_list_container').hide();
|
583
|
-
|
1659
|
+
|
584
1660
|
// Add tabs based upon existing file_list_containers
|
585
1661
|
$('.file_list_container h2').each(function(){
|
586
1662
|
var container_id = $(this).parent().attr('id');
|
587
1663
|
var group_name = $(this).find('.group_name').first().html();
|
588
1664
|
var covered_percent = $(this).find('.covered_percent').first().html();
|
589
|
-
|
1665
|
+
|
590
1666
|
$('.group_tabs').append('<li><a href="#' + container_id + '">' + group_name + ' ('+ covered_percent +')</a></li>');
|
591
1667
|
});
|
592
1668
|
|
593
1669
|
$('.group_tabs a').each( function() {
|
594
1670
|
$(this).addClass($(this).attr('href').replace('#', ''));
|
595
1671
|
});
|
596
|
-
|
1672
|
+
|
597
1673
|
// Make sure tabs don't get ugly focus borders when active
|
598
1674
|
$('.group_tabs a').live('focus', function() { $(this).blur(); });
|
599
|
-
|
1675
|
+
|
600
1676
|
var favicon_path = $('link[rel="shortcut icon"]').attr('href');
|
601
1677
|
$('.group_tabs a').live('click', function(){
|
602
1678
|
if (!$(this).parent().hasClass('active')) {
|
@@ -605,7 +1681,7 @@ $(document).ready(function() {
|
|
605
1681
|
$('.file_list_container').hide();
|
606
1682
|
$(".file_list_container" + $(this).attr('href')).show();
|
607
1683
|
window.location.href = window.location.href.split('#')[0] + $(this).attr('href').replace('#', '#_');
|
608
|
-
|
1684
|
+
|
609
1685
|
// Force favicon reload - otherwise the location change containing anchor would drop the favicon...
|
610
1686
|
// Works only on firefox, but still... - Anyone know a better solution to force favicon on local file?
|
611
1687
|
$('link[rel="shortcut icon"]').remove();
|
@@ -613,13 +1689,18 @@ $(document).ready(function() {
|
|
613
1689
|
};
|
614
1690
|
return false;
|
615
1691
|
});
|
616
|
-
|
1692
|
+
|
617
1693
|
if (jQuery.url.attr('anchor')) {
|
618
|
-
|
1694
|
+
var anchor = jQuery.url.attr('anchor')
|
1695
|
+
if (anchor.length == 40) {
|
1696
|
+
$('a.src_link[href=#' + anchor + ']').click();
|
1697
|
+
} else {
|
1698
|
+
$('.group_tabs a.'+anchor.replace('_', '')).click();
|
1699
|
+
}
|
619
1700
|
} else {
|
620
1701
|
$('.group_tabs a:first').click();
|
621
1702
|
};
|
622
|
-
|
1703
|
+
|
623
1704
|
$("abbr.timeago").timeago();
|
624
1705
|
$('#loading').fadeOut();
|
625
1706
|
$('#wrapper').show();
|