// ***************************
// js.compressed/jquery/jquery.qtip.min.js
// ***************************
/*
* qTip2 - Pretty powerful tooltips
* http://craigsworks.com/projects/qtip2/
*
* Version: nightly
* Copyright 2009-2010 Craig Michael Thompson - http://craigsworks.com
*
* Dual licensed under MIT or GPLv2 licenses
*   http://en.wikipedia.org/wiki/MIT_License
*   http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Dec 19 15:43:28.0000000000 2011
*//*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true *//*global window: false, jQuery: false, console: false */(function(a,b,c){function E(b){var c=this,d=b.elements,e=d.tooltip,f=".bgiframe-"+b.id;a.extend(c,{init:function(){d.bgiframe=a('<iframe class="ui-tooltip-bgiframe" frameborder="0" tabindex="-1" src="javascript:\'\';"  style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=0); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";"></iframe>'),d.bgiframe.appendTo(e),e.bind("tooltipmove"+f,c.adjust)},adjust:function(){var a=b.get("dimensions"),c=b.plugins.tip,f=d.tip,g,h;h=parseInt(e.css("border-left-width"),10)||0,h={left:-h,top:-h},c&&f&&(g=c.corner.precedance==="x"?["width","left"]:["height","top"],h[g[1]]-=f[g[0]]()),d.bgiframe.css(h).css(a)},destroy:function(){d.bgiframe.remove(),e.unbind(f)}}),c.init()}function D(c){var f=this,g=c.options.show.modal,i=c.elements,j=i.tooltip,k="#qtip-overlay",l=".qtipmodal",m=l+c.id,o="is-modal-qtip",q=a(document.body),r;c.checks.modal={"^show.modal.(on|blur)$":function(){f.init(),i.overlay.toggle(j.is(":visible"))}},a.extend(f,{init:function(){if(!g.on)return f;r=f.create(),j.attr(o,d).css("z-index",h.modal.zindex+a(n+"["+o+"]").length).unbind(l).unbind(m).bind("tooltipshow"+l+" tooltiphide"+l,function(b,c,d){var e=b.originalEvent;if(e&&b.type==="tooltiphide"&&/mouse(leave|enter)/.test(e.type)&&a(e.relatedTarget).closest(r[0]).length)try{b.preventDefault()}catch(g){}else(!e||e&&!e.solo)&&f[b.type.replace("tooltip","")](b,d)}).bind("tooltipfocus"+l,function(b){if(!b.isDefaultPrevented()){var c=a(n).filter("["+o+"]"),d=h.modal.zindex+c.length,e=parseInt(j[0].style.zIndex,10);r[0].style.zIndex=d-1,c.each(function(){this.style.zIndex>e&&(this.style.zIndex-=1)}),c.end().filter("."+p).qtip("blur",b.originalEvent),j.addClass(p)[0].style.zIndex=d;try{b.preventDefault()}catch(f){}}}).bind("tooltiphide"+l,function(b){a("["+o+"]").filter(":visible").not(j).last().qtip("focus",b)}),g.escape&&a(b).unbind(m).bind("keydown"+m,function(a){a.keyCode===27&&j.hasClass(p)&&c.hide(a)}),g.blur&&i.overlay.unbind(m).bind("click"+m,function(a){j.hasClass(p)&&c.hide(a)});return f},create:function(){var c=a(k);if(c.length)return i.overlay=c.insertAfter(a(n).last());r=i.overlay=a("<div />",{id:k.substr(1),html:"<div></div>",mousedown:function(){return e}}).insertAfter(a(n).last()),a(b).unbind(l).bind("resize"+l,function(){r.css({height:a(b).height(),width:a(b).width()})}).triggerHandler("resize");return r},toggle:function(b,c,h){if(b&&b.isDefaultPrevented())return f;var i=g.effect,k=c?"show":"hide",l=r.is(":visible"),p=a("["+o+"]").filter(":visible").not(j),s;r||(r=f.create());if(r.is(":animated")&&l===c||!c&&p.length)return f;c?(r.css({left:0,top:0}),r.toggleClass("blurs",g.blur),q.bind("focusin"+m,function(b){var c=a(b.target),d=c.closest(".qtip"),f=d.length<1?e:parseInt(d[0].style.zIndex,10)>parseInt(j[0].style.zIndex,10);!f&&a(b.target).closest(n)[0]!==j[0]&&j.find("input:visible").filter(":first").focus()})):q.undelegate("*","focusin"+m),r.stop(d,e),a.isFunction(i)?i.call(r,c):i===e?r[k]():r.fadeTo(parseInt(h,10)||90,c?1:0,function(){c||a(this).hide()}),c||r.queue(function(a){r.css({left:"",top:""}),a()});return f},show:function(a,b){return f.toggle(a,d,b)},hide:function(a,b){return f.toggle(a,e,b)},destroy:function(){var d=r;d&&(d=a("["+o+"]").not(j).length<1,d?(i.overlay.remove(),a(b).unbind(l)):i.overlay.unbind(l+c.id),q.undelegate("*","focusin"+m));return j.removeAttr(o).unbind(l)}}),f.init()}function C(b,g){function w(a){var b=a.precedance==="y",c=n[b?"width":"height"],d=n[b?"height":"width"],e=a.string().indexOf("center")>-1,f=c*(e?.5:1),g=Math.pow,h=Math.round,i,j,k,l=Math.sqrt(g(f,2)+g(d,2)),m=[p/f*l,p/d*l];m[2]=Math.sqrt(g(m[0],2)-g(p,2)),m[3]=Math.sqrt(g(m[1],2)-g(p,2)),i=l+m[2]+m[3]+(e?0:m[0]),j=i/l,k=[h(j*d),h(j*c)];return{height:k[b?0:1],width:k[b?1:0]}}function v(b){var c=k.titlebar&&b.y==="top",d=c?k.titlebar:k.content,e=a.browser.mozilla,f=e?"-moz-":a.browser.webkit?"-webkit-":"",g=b.y+(e?"":"-")+b.x,h=f+(e?"border-radius-"+g:"border-"+g+"-radius");return parseInt(d.css(h),10)||parseInt(l.css(h),10)||0}function u(a,b,c){b=b?b:a[a.precedance];var d=l.hasClass(r),e=k.titlebar&&a.y==="top",f=e?k.titlebar:k.content,g="border-"+b+"-width",h;l.addClass(r),h=parseInt(f.css(g),10),h=(c?h||parseInt(l.css(g),10):h)||0,l.toggleClass(r,d);return h}function t(a,f,g,h){if(k.tip){var l=i.corner.clone(),n=g.adjusted,o=b.options.position.adjust.method.split(" "),p=o[0],q=o[1]||o[0],r={left:e,top:e,x:0,y:0},s,t={},u;i.corner.fixed!==d&&(p==="shift"&&l.precedance==="x"&&n.left&&l.y!=="center"?l.precedance=l.precedance==="x"?"y":"x":p==="flip"&&n.left&&(l.x=l.x==="center"?n.left>0?"left":"right":l.x==="left"?"right":"left"),q==="shift"&&l.precedance==="y"&&n.top&&l.x!=="center"?l.precedance=l.precedance==="y"?"x":"y":q==="flip"&&n.top&&(l.y=l.y==="center"?n.top>0?"top":"bottom":l.y==="top"?"bottom":"top"),l.string()!==m.corner.string()&&(m.top!==n.top||m.left!==n.left)&&i.update(l,e)),s=i.position(l,n),s.right!==c&&(s.left=-s.right),s.bottom!==c&&(s.top=-s.bottom),s.user=Math.max(0,j.offset);if(r.left=p==="shift"&&!!n.left)l.x==="center"?t["margin-left"]=r.x=s["margin-left"]-n.left:(u=s.right!==c?[n.left,-s.left]:[-n.left,s.left],(r.x=Math.max(u[0],u[1]))>u[0]&&(g.left-=n.left,r.left=e),t[s.right!==c?"right":"left"]=r.x);if(r.top=q==="shift"&&!!n.top)l.y==="center"?t["margin-top"]=r.y=s["margin-top"]-n.top:(u=s.bottom!==c?[n.top,-s.top]:[-n.top,s.top],(r.y=Math.max(u[0],u[1]))>u[0]&&(g.top-=n.top,r.top=e),t[s.bottom!==c?"bottom":"top"]=r.y);k.tip.css(t).toggle(!(r.x&&r.y||l.x==="center"&&r.y||l.y==="center"&&r.x)),g.left-=s.left.charAt?s.user:p!=="shift"||r.top||!r.left&&!r.top?s.left:0,g.top-=s.top.charAt?s.user:q!=="shift"||r.left||!r.left&&!r.top?s.top:0,m.left=n.left,m.top=n.top,m.corner=l.clone()}}var i=this,j=b.options.style.tip,k=b.elements,l=k.tooltip,m={top:0,left:0},n={width:j.width,height:j.height},o={},p=j.border||0,q=".qtip-tip",s=!!(a("<canvas />")[0]||{}).getContext;i.mimic=i.corner=f,i.border=p,i.offset=j.offset,i.size=n,b.checks.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){i.init()||i.destroy(),b.reposition()},"^style.tip.(height|width)$":function(){n={width:j.width,height:j.height},i.create(),i.update(),b.reposition()},"^content.title.text|style.(classes|widget)$":function(){k.tip&&i.update()}},a.extend(i,{init:function(){var b=i.detectCorner()&&(s||a.browser.msie);b&&(i.create(),i.update(),l.unbind(q).bind("tooltipmove"+q,t));return b},detectCorner:function(){var a=j.corner,c=b.options.position,f=c.at,g=c.my.string?c.my.string():c.my;if(a===e||g===e&&f===e)return e;a===d?i.corner=new h.Corner(g):a.string||(i.corner=new h.Corner(a),i.corner.fixed=d);return i.corner.string()!=="centercenter"},detectColours:function(c){var d,e,f,g=k.tip.css("cssText",""),h=c||i.corner,m=h[h.precedance],p="border-"+m+"-color",q="border"+m.charAt(0)+m.substr(1)+"Color",s=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i,t="background-color",u="transparent",v=" !important",w=a(document.body).css("color"),x=b.elements.content.css("color"),y=k.titlebar&&(h.y==="top"||h.y==="center"&&g.position().top+n.height/2+j.offset<k.titlebar.outerHeight(1)),z=y?k.titlebar:k.content;l.addClass(r),o.fill=e=g.css(t),o.border=f=g[0].style[q]||g.css(p)||l.css(p);if(!e||s.test(e))o.fill=z.css(t)||u,s.test(o.fill)&&(o.fill=l.css(t)||e);if(!f||s.test(f)||f===w)o.border=z.css(p)||u,s.test(o.border)&&(o.border=f);a("*",g).add(g).css("cssText",t+":"+u+v+";border:0"+v+";"),l.removeClass(r)},create:function(){var b=n.width,c=n.height,d;k.tip&&k.tip.remove(),k.tip=a("<div />",{"class":"ui-tooltip-tip"}).css({width:b,height:c}).prependTo(l),s?a("<canvas />").appendTo(k.tip)[0].getContext("2d").save():(d='<vml:shape coordorigin="0,0" style="display:inline-block; position:absolute; behavior:url(#default#VML);"></vml:shape>',k.tip.html(d+d),a("*",k.tip).bind("click mousedown",function(a){a.stopPropagation()}))},update:function(b,c){var g=k.tip,l=g.children(),q=n.width,r=n.height,t="px solid ",v="px dashed transparent",x=j.mimic,y=Math.round,z,A,C,D,E;b||(b=m.corner||i.corner),x===e?x=b:(x=new h.Corner(x),x.precedance=b.precedance,x.x==="inherit"?x.x=b.x:x.y==="inherit"?x.y=b.y:x.x===x.y&&(x[b.precedance]=b[b.precedance])),z=x.precedance,i.detectColours(b),o.border!=="transparent"&&o.border!=="#123456"?(p=u(b,f,d),j.border===0&&p>0&&(o.fill=o.border),i.border=p=j.border!==d?j.border:p):i.border=p=0,C=B(x,q,r),i.size=E=w(b),g.css(E),b.precedance==="y"?D=[y(x.x==="left"?p:x.x==="right"?E.width-q-p:(E.width-q)/2),y(x.y==="top"?E.height-r:0)]:D=[y(x.x==="left"?E.width-q:0),y(x.y==="top"?p:x.y==="bottom"?E.height-r-p:(E.height-r)/2)],s?(l.attr(E),A=l[0].getContext("2d"),A.restore(),A.save(),A.clearRect(0,0,3e3,3e3),A.translate(D[0],D[1]),A.beginPath(),A.moveTo(C[0][0],C[0][1]),A.lineTo(C[1][0],C[1][1]),A.lineTo(C[2][0],C[2][1]),A.closePath(),A.fillStyle=o.fill,A.strokeStyle=o.border,A.lineWidth=p*2,A.lineJoin="miter",A.miterLimit=100,p&&A.stroke(),A.fill()):(C="m"+C[0][0]+","+C[0][1]+" l"+C[1][0]+","+C[1][1]+" "+C[2][0]+","+C[2][1]+" xe",D[2]=p&&/^(r|b)/i.test(b.string())?parseFloat(a.browser.version,10)===8?2:1:0,l.css({antialias:""+(x.string().indexOf("center")>-1),left:D[0]-D[2]*Number(z==="x"),top:D[1]-D[2]*Number(z==="y"),width:q+p,height:r+p}).each(function(b){var c=a(this);c[c.prop?"prop":"attr"]({coordsize:q+p+" "+(r+p),path:C,fillcolor:o.fill,filled:!!b,stroked:!b}).css({display:p||b?"block":"none"}),!b&&c.html()===""&&c.html('<vml:stroke weight="'+p*2+'px" color="'+o.border+'" miterlimit="1000" joinstyle="miter"  style="behavior:url(#default#VML); display:inline-block;" />')})),c!==e&&i.position(b)},position:function(b){var c=k.tip,f={},g=Math.max(0,j.offset),h,l,m;if(j.corner===e||!c)return e;b=b||i.corner,h=b.precedance,l=w(b),m=[b.x,b.y],h==="x"&&m.reverse(),a.each(m,function(a,c){var e,i;c==="center"?(e=h==="y"?"left":"top",f[e]="50%",f["margin-"+e]=-Math.round(l[h==="y"?"width":"height"]/2)+g):(e=u(b,c,d),i=v(b),f[c]=a?p?u(b,c):0:g+(i>e?i:0))}),f[b[h]]-=l[h==="x"?"width":"height"],c.css({top:"",bottom:"",left:"",right:"",margin:""}).css(f);return f},destroy:function(){k.tip&&k.tip.remove(),l.unbind(q)}}),m.corner=new h.Corner(i.init())}function B(a,b,c){var d=Math.ceil(b/2),e=Math.ceil(c/2),f={bottomright:[[0,0],[b,c],[b,0]],bottomleft:[[0,0],[b,0],[0,c]],topright:[[0,c],[b,0],[b,c]],topleft:[[0,0],[0,c],[b,c]],topcenter:[[0,c],[d,0],[b,c]],bottomcenter:[[0,0],[b,0],[d,c]],rightcenter:[[0,0],[b,e],[0,c]],leftcenter:[[b,0],[b,c],[0,e]]};f.lefttop=f.bottomright,f.righttop=f.bottomleft,f.leftbottom=f.topright,f.rightbottom=f.topleft;return f[a.string()]}function A(b){var c=this,f=b.elements.tooltip,g=b.options.content.ajax,h=".qtip-ajax",i=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,j=d;b.checks.ajax={"^content.ajax":function(a,b,d){b==="ajax"&&(g=d),b==="once"?c.init():g&&g.url?c.load():f.unbind(h)}},a.extend(c,{init:function(){g&&g.url&&f.unbind(h)[g.once?"one":"bind"]("tooltipshow"+h,c.load);return c},load:function(d,f){function p(a,c,d){a.status!==0&&b.set("content.text",c+": "+d)}function o(c){k&&(c=a("<div/>").append(c.replace(i,"")).find(k)),b.set("content.text",c)}function n(){l&&(b.show(d.originalEvent),f=e),a.isFunction(g.complete)&&g.complete.apply(this,arguments)}var h=g.url.indexOf(" "),j=g.url,k,l=g.once&&!g.loading&&f;if(l)try{d.preventDefault()}catch(m){}else if(d&&d.isDefaultPrevented())return c;h>-1&&(k=j.substr(h),j=j.substr(0,h)),a.ajax(a.extend({success:o,error:p,context:b},g,{url:j,complete:n}))}}),c.init()}function z(b,c){var i,j,k,l,m,n=a(this),o=a(document.body),p=this===document?o:n,q=n.metadata?n.metadata(c.metadata):f,r=c.metadata.type==="html5"&&q?q[c.metadata.name]:f,s=n.data(c.metadata.name||"qtipopts");try{s=typeof s==="string"?(new Function("return "+s))():s}catch(t){w("Unable to parse HTML5 attribute data: "+s)}l=a.extend(d,{},g.defaults,c,typeof s==="object"?x(s):f,x(r||q)),j=l.position,l.id=b;if("boolean"===typeof l.content.text){k=n.attr(l.content.attr);if(l.content.attr!==e&&k)l.content.text=k;else{w("Unable to locate content for tooltip! Aborting render of tooltip on element: ",n);return e}}j.container.length||(j.container=o),j.target===e&&(j.target=p),l.show.target===e&&(l.show.target=p),l.show.solo===d&&(l.show.solo=o),l.hide.target===e&&(l.hide.target=p),l.position.viewport===d&&(l.position.viewport=j.container),j.at=new h.Corner(j.at),j.my=new h.Corner(j.my);if(a.data(this,"qtip"))if(l.overwrite)n.qtip("destroy");else if(l.overwrite===e)return e;l.suppress&&(m=a.attr(this,"title"))&&a(this).removeAttr("title").attr(u,m),i=new y(n,l,b,!!k),a.data(this,"qtip",i),n.bind("remove.qtip-"+b,function(){i.destroy()});return i}function y(s,t,w,y){function R(){var c=[t.show.target[0],t.hide.target[0],z.rendered&&G.tooltip[0],t.position.container[0],t.position.viewport[0],b,document];z.rendered?a([]).pushStack(a.grep(c,function(a){return typeof a==="object"})).unbind(F):t.show.target.unbind(F+"-create")}function Q(){function p(a){E.is(":visible")&&z.reposition(a)}function o(a){if(E.hasClass(m))return e;clearTimeout(z.timers.inactive),z.timers.inactive=setTimeout(function(){z.hide(a)},t.hide.inactive)}function l(b){if(E.hasClass(m)||C||D)return e;var d=a(b.relatedTarget||b.target),g=d.closest(n)[0]===E[0],h=d[0]===f.show[0];clearTimeout(z.timers.show),clearTimeout(z.timers.hide);if(c.target==="mouse"&&g||t.hide.fixed&&(/mouse(out|leave|move)/.test(b.type)&&(g||h)))try{b.preventDefault(),b.stopImmediatePropagation()}catch(i){}else t.hide.delay>0?z.timers.hide=setTimeout(function(){z.hide(b)},t.hide.delay):z.hide(b)}function k(a){if(E.hasClass(m))return e;clearTimeout(z.timers.show),clearTimeout(z.timers.hide);var b=function(){z.toggle(d,a)};t.show.delay>0?z.timers.show=setTimeout(b,t.show.delay):b()}var c=t.position,f={show:t.show.target,hide:t.hide.target,viewport:a(c.viewport),document:a(document),body:a(document.body),window:a(b)},h={show:a.trim(""+t.show.event).split(" "),hide:a.trim(""+t.hide.event).split(" ")},j=a.browser.msie&&parseInt(a.browser.version,10)===6;E.bind("mouseenter"+F+" mouseleave"+F,function(a){var b=a.type==="mouseenter";b&&z.focus(a),E.toggleClass(q,b)}),t.hide.fixed&&(f.hide=f.hide.add(E),E.bind("mouseover"+F,function(){E.hasClass(m)||clearTimeout(z.timers.hide)})),/mouse(out|leave)/i.test(t.hide.event)?t.hide.leave==="window"&&f.window.bind("mouseout"+F+" blur"+F,function(a){/select|option/.test(a.target)&&!a.relatedTarget&&z.hide(a)}):/mouse(over|enter)/i.test(t.show.event)&&f.hide.bind("mouseleave"+F,function(a){clearTimeout(z.timers.show)}),(""+t.hide.event).indexOf("unfocus")>-1&&f.body.bind("mousedown"+F,function(b){var c=a(b.target),d=!E.hasClass(m)&&E.is(":visible");c[0]!==E[0]&&c.parents(n).length===0&&c.add(s).length>1&&!c.attr("disabled")&&z.hide(b)}),"number"===typeof t.hide.inactive&&(f.show.bind("qtip-"+w+"-inactive",o),a.each(g.inactiveEvents,function(a,b){f.hide.add(G.tooltip).bind(b+F+"-inactive",o)})),a.each(h.hide,function(b,c){var d=a.inArray(c,h.show),e=a(f.hide);d>-1&&e.add(f.show).length===e.length||c==="unfocus"?(f.show.bind(c+F,function(a){E.is(":visible")?l(a):k(a)}),delete h.show[d]):f.hide.bind(c+F,l)}),a.each(h.show,function(a,b){f.show.bind(b+F,k)}),"number"===typeof t.hide.distance&&f.show.add(E).bind("mousemove"+F,function(a){var b=H.origin||{},c=t.hide.distance,d=Math.abs;(d(a.pageX-b.pageX)>=c||d(a.pageY-b.pageY)>=c)&&z.hide(a)}),c.target==="mouse"&&(f.show.bind("mousemove"+F,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),c.adjust.mouse&&(t.hide.event&&E.bind("mouseleave"+F,function(a){(a.relatedTarget||a.target)!==f.show[0]&&z.hide(a)}),f.document.bind("mousemove"+F,function(a){!E.hasClass(m)&&E.is(":visible")&&z.reposition(a||i)}))),(c.adjust.resize||f.viewport.length)&&(a.event.special.resize?f.viewport:f.window).bind("resize"+F,p),(f.viewport.length||j&&E.css("position")==="fixed")&&f.viewport.bind("scroll"+F,p)}function P(b,d){function g(b){function i(c){c&&(delete h[c.src],clearTimeout(z.timers.img[c.src]),a(c).unbind(F)),a.isEmptyObject(h)&&(z.redraw(),d!==e&&z.reposition(H.event),b())}var g,h={};if((g=f.find("img:not([height]):not([width])")).length===0)return i();g.each(function(b,d){if(h[d.src]===c){var e=0,f=3;(function g(){if(d.height||d.width||e>f)return i(d);e+=1,z.timers.img[d.src]=setTimeout(g,700)})(),a(d).bind("error"+F+" load"+F,function(){i(this)}),h[d.src]=d}})}var f=G.content;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z)||""),b.jquery&&b.length>0?f.empty().append(b.css({display:"block"})):f.html(b),z.rendered<0?E.queue("fx",g):(D=0,g(a.noop));return z}function O(b,c){var d=G.title;if(!z.rendered||!b)return e;a.isFunction(b)&&(b=b.call(s,H.event,z));if(b===e)return K(e);b.jquery&&b.length>0?d.empty().append(b.css({display:"block"})):d.html(b),z.redraw(),c!==e&&z.rendered&&E.is(":visible")&&z.reposition(H.event)}function N(a){var b=G.button,c=G.title;if(!z.rendered)return e;a?(c||M(),L()):b.remove()}function M(){var b=B+"-title";G.titlebar&&K(),G.titlebar=a("<div />",{"class":k+"-titlebar "+(t.style.widget?"ui-widget-header":"")}).append(G.title=a("<div />",{id:b,"class":k+"-title","aria-atomic":d})).insertBefore(G.content).delegate(".ui-tooltip-close","mousedown keydown mouseup keyup mouseout",function(b){a(this).toggleClass("ui-state-active ui-state-focus",b.type.substr(-4)==="down")}).delegate(".ui-tooltip-close","mouseover mouseout",function(b){a(this).toggleClass("ui-state-hover",b.type==="mouseover")}),t.content.title.button?L():z.rendered&&z.redraw()}function L(){var b=t.content.title.button,c=typeof b==="string",d=c?b:"Close tooltip";G.button&&G.button.remove(),b.jquery?G.button=b:G.button=a("<a />",{"class":"ui-state-default ui-tooltip-close "+(t.style.widget?"":k+"-icon"),title:d,"aria-label":d}).prepend(a("<span />",{"class":"ui-icon ui-icon-close",html:"&times;"})),G.button.appendTo(G.titlebar).attr("role","button").click(function(a){E.hasClass(m)||z.hide(a);return e}),z.redraw()}function K(a){G.title&&(G.titlebar.remove(),G.titlebar=G.title=G.button=f,a!==e&&z.reposition())}function J(){var a=t.style.widget;E.toggleClass(l,a).toggleClass(o,t.style["default"]&&!a),G.content.toggleClass(l+"-content",a),G.titlebar&&G.titlebar.toggleClass(l+"-header",a),G.button&&G.button.toggleClass(k+"-icon",!a)}function I(a){var b=0,c,d=t,e=a.split(".");while(d=d[e[b++]])b<e.length&&(c=d);return[c||t,e.pop()]}var z=this,A=document.body,B=k+"-"+w,C=0,D=0,E=a(),F=".qtip-"+w,G,H;z.id=w,z.rendered=e,z.elements=G={target:s},z.timers={img:{}},z.options=t,z.checks={},z.plugins={},z.cache=H={event:{},target:a(),disabled:e,attr:y},z.checks.builtin={"^id$":function(b,c,f){var h=f===d?g.nextid:f,i=k+"-"+h;h!==e&&h.length>0&&!a("#"+i).length&&(E[0].id=i,G.content[0].id=i+"-content",G.title[0].id=i+"-title")},"^content.text$":function(a,b,c){P(c)},"^content.title.text$":function(a,b,c){if(!c)return K();!G.title&&c&&M(),O(c)},"^content.title.button$":function(a,b,c){N(c)},"^position.(my|at)$":function(a,b,c){"string"===typeof c&&(a[b]=new h.Corner(c))},"^position.container$":function(a,b,c){z.rendered&&E.appendTo(c)},"^show.ready$":function(){z.rendered?z.toggle(d):z.render(1)},"^style.classes$":function(a,b,c){E.attr("class",k+" qtip ui-helper-reset "+c)},"^style.widget|content.title":J,"^events.(render|show|move|hide|focus|blur)$":function(b,c,d){E[(a.isFunction(d)?"":"un")+"bind"]("tooltip"+c,d)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=t.position;E.attr("tracking",a.target==="mouse"&&a.adjust.mouse),R(),Q()}},a.extend(z,{render:function(b){if(z.rendered)return z;var c=t.content.text,f=t.content.title.text,g=t.position,i=a.Event("tooltiprender");a.attr(s[0],"aria-describedby",B),E=G.tooltip=a("<div/>",{id:B,"class":k+" qtip ui-helper-reset "+o+" "+t.style.classes+" "+k+"-pos-"+t.position.my.abbrev(),width:t.style.width||"",height:t.style.height||"",tracking:g.target==="mouse"&&g.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":e,"aria-describedby":B+"-content","aria-hidden":d}).toggleClass(m,H.disabled).data("qtip",z).appendTo(t.position.container).append(G.content=a("<div />",{"class":k+"-content",id:B+"-content","aria-atomic":d})),z.rendered=-1,C=D=1,f&&(M(),a.isFunction(f)||O(f,e)),a.isFunction(c)||P(c,e),z.rendered=d,J(),a.each(t.events,function(b,c){a.isFunction(c)&&E.bind(b==="toggle"?"tooltipshow tooltiphide":"tooltip"+b,c)}),a.each(h,function(){this.initialize==="render"&&this(z)}),Q(),E.queue("fx",function(a){i.originalEvent=H.event,E.trigger(i,[z]),C=D=0,z.redraw(),(t.show.ready||b)&&z.toggle(d,H.event,e),a()});return z},get:function(a){var b,c;switch(a.toLowerCase()){case"dimensions":b={height:E.outerHeight(),width:E.outerWidth()};break;case"offset":b=h.offset(E,t.position.container);break;default:c=I(a.toLowerCase()),b=c[0][c[1]],b=b.precedance?b.string():b}return b},set:function(b,c){function m(a,b){var c,d,e;for(c in k)for(d in k[c])if(e=(new RegExp(d,"i")).exec(a))b.push(e),k[c][d].apply(z,b)}var g=/^position\.(my|at|adjust|target|container)|style|content|show\.ready/i,h=/^content\.(title|attr)|style/i,i=e,j=e,k=z.checks,l;"string"===typeof b?(l=b,b={},b[l]=c):b=a.extend(d,{},b),a.each(b,function(c,d){var e=I(c.toLowerCase()),f;f=e[0][e[1]],e[0][e[1]]="object"===typeof d&&d.nodeType?a(d):d,b[c]=[e[0],e[1],d,f],i=g.test(c)||i,j=h.test(c)||j}),x(t),C=D=1,a.each(b,m),C=D=0,E.is(":visible")&&z.rendered&&(i&&z.reposition(t.position.target==="mouse"?f:H.event),j&&z.redraw());return z},toggle:function(b,c){function q(){b?(a.browser.msie&&E[0].style.removeAttribute("filter"),E.css("overflow",""),"string"===typeof h.autofocus&&a(h.autofocus,E).focus(),p=a.Event("tooltipvisible"),p.originalEvent=c?H.event:f,E.trigger(p,[z]),h.target.trigger("qtip-"+w+"-inactive")):E.css({display:"",visibility:"",opacity:"",left:"",top:""})}if(!z.rendered)return b?z.render(1):z;var g=b?"show":"hide",h=t[g],j=E.is(":visible"),k=!c||t[g].target.length<2||H.target[0]===c.target,l=t.position,m=t.content,o,p;(typeof b).search("boolean|number")&&(b=!j);if(!E.is(":animated")&&j===b&&k)return z;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(H.event.type)&&c.target===t.show.target[0]&&E.has(c.relatedTarget).length)return z;H.event=a.extend({},c)}p=a.Event("tooltip"+g),p.originalEvent=c?H.event:f,E.trigger(p,[z,90]);if(p.isDefaultPrevented())return z;a.attr(E[0],"aria-hidden",!b),b?(H.origin=a.extend({},i),z.focus(c),a.isFunction(m.text)&&P(m.text,e),a.isFunction(m.title.text)&&O(m.title.text,e),!v&&l.target==="mouse"&&l.adjust.mouse&&(a(document).bind("mousemove.qtip",function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),v=d),z.reposition(c,arguments[2]),(p.solo=!!h.solo)&&a(n,h.solo).not(E).qtip("hide",p)):(clearTimeout(z.timers.show),delete H.origin,v&&!a(n+'[tracking="true"]:visible',h.solo).not(E).length&&(a(document).unbind("mousemove.qtip"),v=e),z.blur(c)),k&&E.stop(0,1),h.effect===e?(E[g](),q.call(E)):a.isFunction(h.effect)?(h.effect.call(E,z),E.queue("fx",function(a){q(),a()})):E.fadeTo(90,b?1:0,q),b&&h.target.trigger("qtip-"+w+"-inactive");return z},show:function(a){return z.toggle(d,a)},hide:function(a){return z.toggle(e,a)},focus:function(b){if(!z.rendered)return z;var c=a(n),d=parseInt(E[0].style.zIndex,10),e=g.zindex+c.length,f=a.extend({},b),h,i;E.hasClass(p)||(i=a.Event("tooltipfocus"),i.originalEvent=f,E.trigger(i,[z,e]),i.isDefaultPrevented()||(d!==e&&(c.each(function(){this.style.zIndex>d&&(this.style.zIndex=this.style.zIndex-1)}),c.filter("."+p).qtip("blur",f)),E.addClass(p)[0].style.zIndex=e));return z},blur:function(b){var c=a.extend({},b),d;E.removeClass(p),d=a.Event("tooltipblur"),d.originalEvent=c,E.trigger(d,[z]);return z},reposition:function(c,d){if(!z.rendered||C)return z;C=1;var f=t.position.target,g=t.position,j=g.my,l=g.at,m=g.adjust,n=m.method.split(" "),o=E.outerWidth(),p=E.outerHeight(),q=0,r=0,s=a.Event("tooltipmove"),u=E.css("position")==="fixed",v=g.viewport,w={left:0,top:0},x=g.container,y=e,B=z.plugins.tip,D={horizontal:n[0],vertical:n[1]=n[1]||n[0],enabled:v.jquery&&f[0]!==b&&f[0]!==A&&m.method!=="none",left:function(a){var b=D.horizontal==="shift",c=-x.offset.left+v.offset.left+v.scrollLeft,d=j.x==="left"?o:j.x==="right"?-o:-o/2,e=l.x==="left"?q:l.x==="right"?-q:-q/2,f=B&&B.size?B.size.width||0:0,g=B&&B.corner&&B.corner.precedance==="x"&&!b?f:0,h=c-a+g,i=a+o-v.width-c+g,k=d-(j.precedance==="x"||j.x===j.y?e:0),n=j.x==="center";b?(g=B&&B.corner&&B.corner.precedance==="y"?f:0,k=(j.x==="left"?1:-1)*d-g,w.left+=h>0?h:i>0?-i:0,w.left=Math.max(-x.offset.left+v.offset.left+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.left+v.offset.left+v.width,a+k),w.left))):(h>0&&(j.x!=="left"||i>0)?w.left-=k:i>0&&(j.x!=="right"||h>0)&&(w.left-=n?-k:k),w.left!==a&&n&&(w.left-=m.x),w.left<c&&-w.left>i&&(w.left=a));return w.left-a},top:function(a){var b=D.vertical==="shift",c=-x.offset.top+v.offset.top+v.scrollTop,d=j.y==="top"?p:j.y==="bottom"?-p:-p/2,e=l.y==="top"?r:l.y==="bottom"?-r:-r/2,f=B&&B.size?B.size.height||0:0,g=B&&B.corner&&B.corner.precedance==="y"&&!b?f:0,h=c-a+g,i=a+p-v.height-c+g,k=d-(j.precedance==="y"||j.x===j.y?e:0),n=j.y==="center";b?(g=B&&B.corner&&B.corner.precedance==="x"?f:0,k=(j.y==="top"?1:-1)*d-g,w.top+=h>0?h:i>0?-i:0,w.top=Math.max(-x.offset.top+v.offset.top+(g&&B.corner.x==="center"?B.offset:0),a-k,Math.min(Math.max(-x.offset.top+v.offset.top+v.height,a+k),w.top))):(h>0&&(j.y!=="top"||i>0)?w.top-=k:i>0&&(j.y!=="bottom"||h>0)&&(w.top-=n?-k:k),w.top!==a&&n&&(w.top-=m.y),w.top<0&&-w.top>i&&(w.top=a));return w.top-a}},F;if(a.isArray(f)&&f.length===2)l={x:"left",y:"top"},w={left:f[0],top:f[1]};else if(f==="mouse"&&(c&&c.pageX||H.event.pageX))l={x:"left",y:"top"},c=(c&&(c.type==="resize"||c.type==="scroll")?H.event:c&&c.pageX&&c.type==="mousemove"?c:i&&i.pageX&&(m.mouse||!c||!c.pageX)?{pageX:i.pageX,pageY:i.pageY}:!m.mouse&&H.origin&&H.origin.pageX?H.origin:c)||c||H.event||i||{},w={top:c.pageY,left:c.pageX};else{f==="event"?c&&c.target&&c.type!=="scroll"&&c.type!=="resize"?f=H.target=a(c.target):f=H.target:H.target=a(f),f=a(f).eq(0);if(f.length===0)return z;f[0]===document||f[0]===b?(q=h.iOS?b.innerWidth:f.width(),r=h.iOS?b.innerHeight:f.height(),f[0]===b&&(w={top:u||h.iOS?(v||f).scrollTop():0,left:u||h.iOS?(v||f).scrollLeft():0})):f.is("area")&&h.imagemap?w=h.imagemap(f,l,D.enabled?n:e):f[0].namespaceURI==="http://www.w3.org/2000/svg"&&h.svg?w=h.svg(f,l):(q=f.outerWidth(),r=f.outerHeight(),w=h.offset(f,x)),w.offset&&(q=w.width,r=w.height,y=w.flipoffset,w=w.offset);if(h.iOS<4.1&&h.iOS>3.1||h.iOS==4.3||!h.iOS&&u)F=a(b),w.left-=F.scrollLeft(),w.top-=F.scrollTop();w.left+=l.x==="right"?q:l.x==="center"?q/2:0,w.top+=l.y==="bottom"?r:l.y==="center"?r/2:0}w.left+=m.x+(j.x==="right"?-o:j.x==="center"?-o/2:0),w.top+=m.y+(j.y==="bottom"?-p:j.y==="center"?-p/2:0),D.enabled?(v={elem:v,height:v[(v[0]===b?"h":"outerH")+"eight"](),width:v[(v[0]===b?"w":"outerW")+"idth"](),scrollLeft:u?0:v.scrollLeft(),scrollTop:u?0:v.scrollTop(),offset:v.offset()||{left:0,top:0}},x={elem:x,scrollLeft:x.scrollLeft(),scrollTop:x.scrollTop(),offset:x.offset()||{left:0,top:0}},w.adjusted={left:D.horizontal!=="none"?D.left(w.left):0,top:D.vertical!=="none"?D.top(w.top):0},w.adjusted.left+w.adjusted.top&&E.attr("class",E[0].className.replace(/ui-tooltip-pos-\w+/i,k+"-pos-"+j.abbrev())),y&&w.adjusted.left&&(w.left+=y.left),y&&w.adjusted.top&&(w.top+=y.top)):w.adjusted={left:0,top:0},s.originalEvent=a.extend({},c),E.trigger(s,[z,w,v.elem||v]);if(s.isDefaultPrevented())return z;delete w.adjusted,d===e||isNaN(w.left)||isNaN(w.top)||f==="mouse"||!a.isFunction(g.effect)?E.css(w):a.isFunction(g.effect)&&(g.effect.call(E,z,a.extend({},w)),E.queue(function(b){a(this).css({opacity:"",height:""}),a.browser.msie&&this.style.removeAttribute("filter"),b()})),C=0;return z},redraw:function(){if(z.rendered<1||D)return z;var a=t.position.container,b,c,d,e;D=1,t.style.height&&E.css("height",t.style.height),t.style.width?E.css("width",t.style.width):(E.css("width","").addClass(r),c=E.width()+1,d=E.css("max-width")||"",e=E.css("min-width")||"",b=(d+e).indexOf("%")>-1?a.width()/100:0,d=(d.indexOf("%")>-1?b:1)*parseInt(d,10)||c,e=(e.indexOf("%")>-1?b:1)*parseInt(e,10)||0,c=d+e?Math.min(Math.max(c,e),d):c,E.css("width",Math.round(c)).removeClass(r)),D=0;return z},disable:function(b){"boolean"!==typeof b&&(b=!E.hasClass(m)&&!H.disabled),z.rendered?(E.toggleClass(m,b),a.attr(E[0],"aria-disabled",b)):H.disabled=!!b;return z},enable:function(){return z.disable(e)},destroy:function(){var b=s[0],c=a.attr(b,u),d=s.data("qtip");z.rendered&&(E.remove(),a.each(z.plugins,function(){this.destroy&&this.destroy()})),clearTimeout(z.timers.show),clearTimeout(z.timers.hide),R();if(!d||z===d)a.removeData(b,"qtip"),t.suppress&&c&&(a.attr(b,"title",c),s.removeAttr(u)),s.removeAttr("aria-describedby");s.unbind(".qtip-"+w),delete j[z.id];return s}})}function x(b){var c;if(!b||"object"!==typeof b)return e;if(b.metadata===f||"object"!==typeof b.metadata)b.metadata={type:b.metadata};if("content"in b){if(b.content===f||"object"!==typeof b.content||b.content.jquery)b.content={text:b.content};c=b.content.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.text=e);if("title"in b.content){if(b.content.title===f||"object"!==typeof b.content.title)b.content.title={text:b.content.title};c=b.content.title.text||e,!a.isFunction(c)&&(!c&&!c.attr||c.length<1||"object"===typeof c&&!c.jquery)&&(b.content.title.text=e)}}if("position"in b)if(b.position===f||"object"!==typeof b.position)b.position={my:b.position,at:b.position};if("show"in b)if(b.show===f||"object"!==typeof b.show)b.show.jquery?b.show={target:b.show}:b.show={event:b.show};if("hide"in b)if(b.hide===f||"object"!==typeof b.hide)b.hide.jquery?b.hide={target:b.hide}:b.hide={event:b.hide};if("style"in b)if(b.style===f||"object"!==typeof b.style)b.style={classes:b.style};a.each(h,function(){this.sanitize&&this.sanitize(b)});return b}function w(){w.history=w.history||[],w.history.push(arguments);if("object"===typeof console){var a=console[console.warn?"warn":"log"],b=Array.prototype.slice.call(arguments),c;typeof arguments[0]==="string"&&(b[0]="qTip2: "+b[0]),c=a.apply?a.apply(console,b):a(b)}}"use strict";var d=!0,e=!1,f=null,g,h,i,j={},k="ui-tooltip",l="ui-widget",m="ui-state-disabled",n="div.qtip."+k,o=k+"-default",p=k+"-focus",q=k+"-hover",r=k+"-fluid",s="-31000px",t="_replacedByqTip",u="oldtitle",v;g=a.fn.qtip=function(b,h,i){var j=(""+b).toLowerCase(),k=f,l=a.makeArray(arguments).slice(1),m=l[l.length-1],n=this[0]?a.data(this[0],"qtip"):f;if(!arguments.length&&n||j==="api")return n;if("string"===typeof b){this.each(function(){var b=a.data(this,"qtip");if(!b)return d;m&&m.timeStamp&&(b.cache.event=m);if(j!=="option"&&j!=="options"||!h)b[j]&&b[j].apply(b[j],l);else if(a.isPlainObject(h)||i!==c)b.set(h,i);else{k=b.get(h);return e}});return k!==f?k:this}if("object"===typeof b||!arguments.length){n=x(a.extend(d,{},b));return g.bind.call(this,n,m)}},g.bind=function(b,f){return this.each(function(k){function r(b){function d(){p.render(typeof b==="object"||l.show.ready),m.show.add(m.hide).unbind(o)}if(p.cache.disabled)return e;p.cache.event=a.extend({},b),p.cache.target=b?a(b.target):[c],l.show.delay>0?(clearTimeout(p.timers.show),p.timers.show=setTimeout(d,l.show.delay),n.show!==n.hide&&m.hide.bind(n.hide,function(){clearTimeout(p.timers.show)})):d()}var l,m,n,o,p,q;q=a.isArray(b.id)?b.id[k]:b.id,q=!q||q===e||q.length<1||j[q]?g.nextid++:j[q]=q,o=".qtip-"+q+"-create",p=z.call(this,q,b);if(p===e)return d;l=p.options,a.each(h,function(){this.initialize==="initialize"&&this(p)}),m={show:l.show.target,hide:l.hide.target},n={show:a.trim(""+l.show.event).replace(/ /g,o+" ")+o,hide:a.trim(""+l.hide.event).replace(/ /g,o+" ")+o},/mouse(over|enter)/i.test(n.show)&&!/mouse(out|leave)/i.test(n.hide)&&(n.hide+=" mouseleave"+o),m.show.bind("mousemove"+o,function(a){i={pageX:a.pageX,pageY:a.pageY,type:"mousemove"}}),m.show.bind(n.show,r),(l.show.ready||l.prerender)&&r(f)})},h=g.plugins={Corner:function(a){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,"center").toLowerCase(),this.x=(a.match(/left|right/i)||a.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(a.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase();var b=a.charAt(0);this.precedance=b==="t"||b==="b"?"y":"x",this.string=function(){return this.precedance==="y"?this.y+this.x:this.x+this.y},this.abbrev=function(){var a=this.x.substr(0,1),b=this.y.substr(0,1);return a===b?a:a==="c"||a!=="c"&&b!=="c"?b+a:a+b},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone}}},offset:function(a,b){function i(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}var c=a.offset(),d=b,e=0,f=document.body,g,h;if(d){do{d.css("position")!=="static"&&(g=d[0]===f?{left:parseInt(d.css("left"),10)||0,top:parseInt(d.css("top"),10)||0}:d.position(),c.left-=g.left+(parseInt(d.css("borderLeftWidth"),10)||0)+(parseInt(d.css("marginLeft"),10)||0),c.top-=g.top+(parseInt(d.css("borderTopWidth"),10)||0),h=d.css("overflow"),(h==="scroll"||h==="auto")&&++e);if(d[0]===f)break}while(d=d.offsetParent());b[0]!==f&&e&&i(b,1)}return c},iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,3})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_","."))||e,fn:{attr:function(b,c){if(this.length){var d=this[0],e="title",f=a.data(d,"qtip");if(b===e&&f&&"object"===typeof f&&f.options.suppress){if(arguments.length<2)return a.attr(d,u);f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",c);return this.attr(u,c)}}return a.fn["attr"+t].apply(this,arguments)},clone:function(b){var c=a([]),d="title",e=a.fn["clone"+t].apply(this,arguments);b||e.filter("["+u+"]").attr("title",function(){return a.attr(this,u)}).removeAttr(u);return e},remove:a.ui?f:function(b,c){a.ui||a(this).each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add(this).each(function(){a(this).triggerHandler("remove")})})}}},a.each(h.fn,function(b,c){if(!c||a.fn[b+t])return d;var e=a.fn[b+t]=a.fn[b];a.fn[b]=function(){return c.apply(this,arguments)||e.apply(this,arguments)}}),g.version="nightly",g.nextid=0,g.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),g.zindex=15e3,g.defaults={prerender:e,id:e,overwrite:d,suppress:d,content:{text:d,attr:"title",title:{text:e,button:e}},position:{my:"top left",at:"bottom right",target:e,container:e,viewport:e,adjust:{x:0,y:0,mouse:d,resize:d,method:"flip flip"},effect:function(b,c,d){a(this).animate(c,{duration:200,queue:e})}},show:{target:e,event:"mouseenter",effect:d,delay:90,solo:e,ready:e,autofocus:e},hide:{target:e,event:"mouseleave",effect:d,delay:0,fixed:e,inactive:e,leave:"window",distance:e},style:{classes:"",widget:e,width:e,height:e,"default":d},events:{render:f,move:f,show:f,hide:f,toggle:f,visible:f,focus:f,blur:f}},h.ajax=function(a){var b=a.plugins.ajax;return"object"===typeof b?b:a.plugins.ajax=new A(a)},h.ajax.initialize="render",h.ajax.sanitize=function(a){var b=a.content,c;b&&"ajax"in b&&(c=b.ajax,typeof c!=="object"&&(c=a.content.ajax={url:c}),"boolean"!==typeof c.once&&c.once&&(c.once=!!c.once))},a.extend(d,g.defaults,{content:{ajax:{loading:d,once:d}}}),h.imagemap=function(b,c,d){function n(a,b,c){var d=0,e=1,f=1,g=0,h=0,i=a.width,j=a.height;while(i>0&&j>0&&e>0&&f>0){i=Math.floor(i/2),j=Math.floor(j/2),c.x==="left"?e=i:c.x==="right"?e=a.width-i:e+=Math.floor(i/2),c.y==="top"?f=j:c.y==="bottom"?f=a.height-j:f+=Math.floor(j/2),d=b.length;while(d--){if(b.length<2)break;g=b[d][0]-a.offset.left,h=b[d][1]-a.offset.top,(c.x==="left"&&g>=e||c.x==="right"&&g<=e||c.x==="center"&&(g<e||g>a.width-e)||c.y==="top"&&h>=f||c.y==="bottom"&&h<=f||c.y==="center"&&(h<f||h>a.height-f))&&b.splice(d,1)}}return{left:b[0][0],top:b[0][1]}}b.jquery||(b=a(b));var e=(b[0].shape||b.attr("shape")).toLowerCase(),f=(b[0].coords||b.attr("coords")).split(","),g=[],h=a('img[usemap="#'+b.parent("map").attr("name")+'"]'),i=h.offset(),j={width:0,height:0,offset:{top:1e10,right:0,bottom:0,left:1e10}},k=0,l=0,m;i.left+=Math.ceil((h.outerWidth()-h.width())/2),i.top+=Math.ceil((h.outerHeight()-h.height())/2);if(e==="poly"){k=f.length;while(k--)l=[parseInt(f[--k],10),parseInt(f[k+1],10)],l[0]>j.offset.right&&(j.offset.right=l[0]),l[0]<j.offset.left&&(j.offset.left=l[0]),l[1]>j.offset.bottom&&(j.offset.bottom=l[1]),l[1]<j.offset.top&&(j.offset.top=l[1]),g.push(l)}else g=a.map(f,function(a){return parseInt(a,10)});switch(e){case"rect":j={width:Math.abs(g[2]-g[0]),height:Math.abs(g[3]-g[1]),offset:{left:Math.min(g[0],g[2]),top:Math.min(g[1],g[3])}};break;case"circle":j={width:g[2]+2,height:g[2]+2,offset:{left:g[0],top:g[1]}};break;case"poly":a.extend(j,{width:Math.abs(j.offset.right-j.offset.left),height:Math.abs(j.offset.bottom-j.offset.top)}),c.string()==="centercenter"?j.offset={left:j.offset.left+j.width/2,top:j.offset.top+j.height/2}:(j.offset=n(j,g.slice(),c),d&&(d[0]==="flip"||d[1]==="flip")&&(j.flipoffset=n(j,g.slice(),{x:c.x==="left"?"right":c.x==="right"?"left":"center",y:c.y==="top"?"bottom":c.y==="bottom"?"top":"center"}),j.flipoffset.left-=j.offset.left,j.flipoffset.top-=j.offset.top)),j.width=j.height=0}j.offset.left+=i.left,j.offset.top+=i.top;return j},h.tip=function(a){var b=a.plugins.tip;return"object"===typeof b?b:a.plugins.tip=new C(a)},h.tip.initialize="render",h.tip.sanitize=function(a){var b=a.style,c;b&&"tip"in b&&(c=a.style.tip,typeof c!=="object"&&(a.style.tip={corner:c}),/string|boolean/i.test(typeof c.corner)||(c.corner=d),typeof c.width!=="number"&&delete c.width,typeof c.height!=="number"&&delete c.height,typeof c.border!=="number"&&c.border!==d&&delete c.border,typeof c.offset!=="number"&&delete c.offset)},a.extend(d,g.defaults,{style:{tip:{corner:d,mimic:e,width:6,height:6,border:d,offset:0}}}),h.svg=function(b,c){var d=a(document),e=b[0],f={width:0,height:0,offset:{top:1e10,left:1e10}},g,h,i,j,k;if(e.getBBox&&e.parentNode){g=e.getBBox(),h=e.getScreenCTM(),i=e.farthestViewportElement||e;if(!i.createSVGPoint)return f;j=i.createSVGPoint(),j.x=g.x,j.y=g.y,k=j.matrixTransform(h),f.offset.left=k.x,f.offset.top=k.y,j.x+=g.width,j.y+=g.height,k=j.matrixTransform(h),f.width=k.x-f.offset.left,f.height=k.y-f.offset.top,f.offset.left+=d.scrollLeft(),f.offset.top+=d.scrollTop()}return f},h.modal=function(a){var b=a.plugins.modal;return"object"===typeof b?b:a.plugins.modal=new D(a)},h.modal.initialize="render",h.modal.sanitize=function(a){a.show&&(typeof a.show.modal!=="object"?a.show.modal={on:!!a.show.modal}:typeof a.show.modal.on==="undefined"&&(a.show.modal.on=d))},h.modal.zindex=g.zindex+1e3,a.extend(d,g.defaults,{show:{modal:{on:e,effect:d,blur:d,escape:d}}}),h.bgiframe=function(b){var c=a.browser,d=b.plugins.bgiframe;if(a("select, object").length<1||(!c.msie||(""+c.version).charAt(0)!=="6"))return e;return"object"===typeof d?d:b.plugins.bgiframe=new E(b)},h.bgiframe.initialize="render"})(jQuery,window);

// ***************************
// js.compressed/qtip.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["no_preview_text_available","loading"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,["threadpreview"]);(function(){$(".js-tooltip[title]").qtip({style:{classes:"ui-tooltip-shadow"}});if(vBulletin.options.get("threadpreview")>0&&(($(".channel-content-widget").length>0&&$(".channel-content-widget").eq(0).attr("data-canviewtopiccontent"))||$(".search-results-widget").length>0)){var A=function(){var B=$(this);if(B.data("vb-qtip-preview-initialized")=="1"){return }B.data("vb-qtip-preview-initialized","1");var C=B.closest(".topic-item").attr("data-node-id")||B.closest(".js-post").attr("data-node-id");B.qtip({content:{text:function(E,D){console.log("Qtip fetching topic preview.");$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/fetch-node-preview?nodeid="+C,dataType:"json"}).done(function(F){if(typeof (F)!="string"&&typeof (F[0])=="string"){F=F[0]}if($.trim(F)!=""){var G='<div class="b-topicpreview__previewtext">'+F+"</div>";D.set("content.text",G)}else{var G='<div class="b-topicpreview__previewtext">'+vBulletin.phrase.get("no_preview_text_available")+"</div>";D.set("content.text",G)}}).fail(function(H,F,G){D.set("content.text",F+": "+G)});return vBulletin.phrase.get("loading")}},show:{delay:500},position:{my:"top left",at:"bottom right",viewport:$(window)},style:{classes:"ui-tooltip-shadow ui-tooltip-rounded b-topicpreview"}});console.log("Qtip topic preview initialized.");B.trigger("mouseover")};$(document).off("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title").on("mouseover",".topic-list-container .topic-title, .conversation-list .post-title, .conversation-list .b-post__title",A)}})();;

// ***************************
// js.compressed/jquery/jquery-ui-timepicker-addon.min.js
// ***************************
/*
 * jQuery timepicker addon
 * By: Trent Richardson [http://trentrichardson.com]
 * Version 1.1.1
 * Last Modified: 11/07/2012
 *
 * Copyright 2012 Trent Richardson
 * You may use this project under MIT or GPL licenses.
 * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
 * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
 */

/*jslint evil: true, white: false, undef: false, nomen: false */
(function($){$.ui.timepicker=$.ui.timepicker||{};if($.ui.timepicker.version){return}$.extend($.ui,{timepicker:{version:"1.1.1"}});function Timepicker(){this.regional=[];this.regional['']={currentText:'Now',closeText:'Done',amNames:['AM','A'],pmNames:['PM','P'],timeFormat:'HH:mm',timeSuffix:'',timeOnlyTitle:'Choose Time',timeText:'Time',hourText:'Hour',minuteText:'Minute',secondText:'Second',millisecText:'Millisecond',timezoneText:'Time Zone',isRTL:false};this._defaults={showButtonPanel:true,timeOnly:false,showHour:true,showMinute:true,showSecond:false,showMillisec:false,showTimezone:false,showTime:true,stepHour:1,stepMinute:1,stepSecond:1,stepMillisec:1,hour:0,minute:0,second:0,millisec:0,timezone:null,useLocalTimezone:false,defaultTimezone:"+0000",hourMin:0,minuteMin:0,secondMin:0,millisecMin:0,hourMax:23,minuteMax:59,secondMax:59,millisecMax:999,minDateTime:null,maxDateTime:null,onSelect:null,hourGrid:0,minuteGrid:0,secondGrid:0,millisecGrid:0,alwaysSetTime:true,separator:' ',altFieldTimeOnly:true,altTimeFormat:null,altSeparator:null,altTimeSuffix:null,pickerTimeFormat:null,pickerTimeSuffix:null,showTimepicker:true,timezoneIso8601:false,timezoneList:null,addSliderAccess:false,sliderAccessArgs:null,controlType:'slider',defaultValue:null,parse:'strict'};$.extend(this._defaults,this.regional[''])}$.extend(Timepicker.prototype,{$input:null,$altInput:null,$timeObj:null,inst:null,hour_slider:null,minute_slider:null,second_slider:null,millisec_slider:null,timezone_select:null,hour:0,minute:0,second:0,millisec:0,timezone:null,defaultTimezone:"+0000",hourMinOriginal:null,minuteMinOriginal:null,secondMinOriginal:null,millisecMinOriginal:null,hourMaxOriginal:null,minuteMaxOriginal:null,secondMaxOriginal:null,millisecMaxOriginal:null,ampm:'',formattedDate:'',formattedTime:'',formattedDateTime:'',timezoneList:null,units:['hour','minute','second','millisec'],control:null,setDefaults:function(settings){extendRemove(this._defaults,settings||{});return this},_newInst:function($input,o){var tp_inst=new Timepicker(),inlineSettings={},fns={},overrides,i;for(var attrName in this._defaults){if(this._defaults.hasOwnProperty(attrName)){var attrValue=$input.attr('time:'+attrName);if(attrValue){try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}}overrides={beforeShow:function(input,dp_inst){if($.isFunction(tp_inst._defaults.evnts.beforeShow)){return tp_inst._defaults.evnts.beforeShow.call($input[0],input,dp_inst,tp_inst)}},onChangeMonthYear:function(year,month,dp_inst){tp_inst._updateDateTime(dp_inst);if($.isFunction(tp_inst._defaults.evnts.onChangeMonthYear)){tp_inst._defaults.evnts.onChangeMonthYear.call($input[0],year,month,dp_inst,tp_inst)}},onClose:function(dateText,dp_inst){if(tp_inst.timeDefined===true&&$input.val()!==''){tp_inst._updateDateTime(dp_inst)}if($.isFunction(tp_inst._defaults.evnts.onClose)){tp_inst._defaults.evnts.onClose.call($input[0],dateText,dp_inst,tp_inst)}}};for(i in overrides){if(overrides.hasOwnProperty(i)){fns[i]=o[i]||null}}tp_inst._defaults=$.extend({},this._defaults,inlineSettings,o,overrides,{evnts:fns,timepicker:tp_inst});tp_inst.amNames=$.map(tp_inst._defaults.amNames,function(val){return val.toUpperCase()});tp_inst.pmNames=$.map(tp_inst._defaults.pmNames,function(val){return val.toUpperCase()});if(typeof(tp_inst._defaults.controlType)==='string'){if($.fn[tp_inst._defaults.controlType]===undefined){tp_inst._defaults.controlType='select'}tp_inst.control=tp_inst._controls[tp_inst._defaults.controlType]}else{tp_inst.control=tp_inst._defaults.controlType}if(tp_inst._defaults.timezoneList===null){var timezoneList=['-1200','-1100','-1000','-0930','-0900','-0800','-0700','-0600','-0500','-0430','-0400','-0330','-0300','-0200','-0100','+0000','+0100','+0200','+0300','+0330','+0400','+0430','+0500','+0530','+0545','+0600','+0630','+0700','+0800','+0845','+0900','+0930','+1000','+1030','+1100','+1130','+1200','+1245','+1300','+1400'];if(tp_inst._defaults.timezoneIso8601){timezoneList=$.map(timezoneList,function(val){return val=='+0000'?'Z':(val.substring(0,3)+':'+val.substring(3))})}tp_inst._defaults.timezoneList=timezoneList}tp_inst.timezone=tp_inst._defaults.timezone;tp_inst.hour=tp_inst._defaults.hour;tp_inst.minute=tp_inst._defaults.minute;tp_inst.second=tp_inst._defaults.second;tp_inst.millisec=tp_inst._defaults.millisec;tp_inst.ampm='';tp_inst.$input=$input;if(o.altField){tp_inst.$altInput=$(o.altField).css({cursor:'pointer'}).focus(function(){$input.trigger("focus")})}if(tp_inst._defaults.minDate===0||tp_inst._defaults.minDateTime===0){tp_inst._defaults.minDate=new Date()}if(tp_inst._defaults.maxDate===0||tp_inst._defaults.maxDateTime===0){tp_inst._defaults.maxDate=new Date()}if(tp_inst._defaults.minDate!==undefined&&tp_inst._defaults.minDate instanceof Date){tp_inst._defaults.minDateTime=new Date(tp_inst._defaults.minDate.getTime())}if(tp_inst._defaults.minDateTime!==undefined&&tp_inst._defaults.minDateTime instanceof Date){tp_inst._defaults.minDate=new Date(tp_inst._defaults.minDateTime.getTime())}if(tp_inst._defaults.maxDate!==undefined&&tp_inst._defaults.maxDate instanceof Date){tp_inst._defaults.maxDateTime=new Date(tp_inst._defaults.maxDate.getTime())}if(tp_inst._defaults.maxDateTime!==undefined&&tp_inst._defaults.maxDateTime instanceof Date){tp_inst._defaults.maxDate=new Date(tp_inst._defaults.maxDateTime.getTime())}tp_inst.$input.bind('focus',function(){tp_inst._onFocus()});return tp_inst},_addTimePicker:function(dp_inst){var currDT=(this.$altInput&&this._defaults.altFieldTimeOnly)?this.$input.val()+' '+this.$altInput.val():this.$input.val();this.timeDefined=this._parseTime(currDT);this._limitMinMaxDateTime(dp_inst,false);this._injectTimePicker()},_parseTime:function(timeString,withDate){if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}if(withDate||!this._defaults.timeOnly){var dp_dateFormat=$.datepicker._get(this.inst,'dateFormat');try{var parseRes=parseDateTimeInternal(dp_dateFormat,this._defaults.timeFormat,timeString,$.datepicker._getFormatConfig(this.inst),this._defaults);if(!parseRes.timeObj){return false}$.extend(this,parseRes.timeObj)}catch(err){$.datepicker.log("Error parsing the date/time string: "+err+"\ndate/time string = "+timeString+"\ntimeFormat = "+this._defaults.timeFormat+"\ndateFormat = "+dp_dateFormat);return false}return true}else{var timeObj=$.datepicker.parseTime(this._defaults.timeFormat,timeString,this._defaults);if(!timeObj){return false}$.extend(this,timeObj);return true}},_injectTimePicker:function(){var $dp=this.inst.dpDiv,o=this.inst.settings,tp_inst=this,litem='',uitem='',max={},gridSize={},size=null;if($dp.find("div.ui-timepicker-div").length===0&&o.showTimepicker){var noDisplay=' style="display:none;"',html='<div class="ui-timepicker-div'+(o.isRTL?' ui-timepicker-rtl':'')+'"><dl>'+'<dt class="ui_tpicker_time_label"'+((o.showTime)?'':noDisplay)+'>'+o.timeText+'</dt>'+'<dd class="ui_tpicker_time"'+((o.showTime)?'':noDisplay)+'></dd>';for(var i=0,l=this.units.length;i<l;i++){litem=this.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);max[litem]=parseInt((o[litem+'Max']-((o[litem+'Max']-o[litem+'Min'])%o['step'+uitem])),10);gridSize[litem]=0;html+='<dt class="ui_tpicker_'+litem+'_label"'+((o['show'+uitem])?'':noDisplay)+'>'+o[litem+'Text']+'</dt>'+'<dd class="ui_tpicker_'+litem+'"><div class="ui_tpicker_'+litem+'_slider"'+((o['show'+uitem])?'':noDisplay)+'></div>';if(o['show'+uitem]&&o[litem+'Grid']>0){html+='<div style="padding-left: 1px"><table class="ui-tpicker-grid-label"><tr>';if(litem=='hour'){for(var h=o[litem+'Min'];h<=max[litem];h+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;var tmph=$.datepicker.formatTime(useAmpm(o.pickerTimeFormat||o.timeFormat)?'hht':'HH',{hour:h},o);html+='<td data-for="'+litem+'">'+tmph+'</td>'}}else{for(var m=o[litem+'Min'];m<=max[litem];m+=parseInt(o[litem+'Grid'],10)){gridSize[litem]++;html+='<td data-for="'+litem+'">'+((m<10)?'0':'')+m+'</td>'}}html+='</tr></table></div>'}html+='</dd>'}html+='<dt class="ui_tpicker_timezone_label"'+((o.showTimezone)?'':noDisplay)+'>'+o.timezoneText+'</dt>';html+='<dd class="ui_tpicker_timezone" '+((o.showTimezone)?'':noDisplay)+'></dd>';html+='</dl></div>';var $tp=$(html);if(o.timeOnly===true){$tp.prepend('<div class="ui-widget-header ui-helper-clearfix ui-corner-all">'+'<div class="ui-datepicker-title">'+o.timeOnlyTitle+'</div>'+'</div>');$dp.find('.ui-datepicker-header, .ui-datepicker-calendar').hide()}for(var i=0,l=tp_inst.units.length;i<l;i++){litem=tp_inst.units[i];uitem=litem.substr(0,1).toUpperCase()+litem.substr(1);tp_inst[litem+'_slider']=tp_inst.control.create(tp_inst,$tp.find('.ui_tpicker_'+litem+'_slider'),litem,tp_inst[litem],o[litem+'Min'],max[litem],o['step'+uitem]);if(o['show'+uitem]&&o[litem+'Grid']>0){size=100*gridSize[litem]*o[litem+'Grid']/(max[litem]-o[litem+'Min']);$tp.find('.ui_tpicker_'+litem+' table').css({width:size+"%",marginLeft:o.isRTL?'0':((size/(-2*gridSize[litem]))+"%"),marginRight:o.isRTL?((size/(-2*gridSize[litem]))+"%"):'0',borderCollapse:'collapse'}).find("td").click(function(e){var $t=$(this),h=$t.html(),n=parseInt(h.replace(/[^0-9]/g),10),ap=h.replace(/[^apm]/ig),f=$t.data('for');if(f=='hour'){if(ap.indexOf('p')!==-1&&n<12){n+=12}else{if(ap.indexOf('a')!==-1&&n===12){n=0}}}tp_inst.control.value(tp_inst,tp_inst[f+'_slider'],litem,n);tp_inst._onTimeChange();tp_inst._onSelectHandler()}).css({cursor:'pointer',width:(100/gridSize[litem])+'%',textAlign:'center',overflow:'hidden'})}}this.timezone_select=$tp.find('.ui_tpicker_timezone').append('<select></select>').find("select");$.fn.append.apply(this.timezone_select,$.map(o.timezoneList,function(val,idx){return $("<option />").val(typeof val=="object"?val.value:val).text(typeof val=="object"?val.label:val)}));if(typeof(this.timezone)!="undefined"&&this.timezone!==null&&this.timezone!==""){var local_date=new Date(this.inst.selectedYear,this.inst.selectedMonth,this.inst.selectedDay,12);var local_timezone=$.timepicker.timeZoneOffsetString(local_date);if(local_timezone==this.timezone){selectLocalTimeZone(tp_inst)}else{this.timezone_select.val(this.timezone)}}else{if(typeof(this.hour)!="undefined"&&this.hour!==null&&this.hour!==""){this.timezone_select.val(o.defaultTimezone)}else{selectLocalTimeZone(tp_inst)}}this.timezone_select.change(function(){tp_inst._defaults.useLocalTimezone=false;tp_inst._onTimeChange()});var $buttonPanel=$dp.find('.ui-datepicker-buttonpane');if($buttonPanel.length){$buttonPanel.before($tp)}else{$dp.append($tp)}this.$timeObj=$tp.find('.ui_tpicker_time');if(this.inst!==null){var timeDefined=this.timeDefined;this._onTimeChange();this.timeDefined=timeDefined}if(this._defaults.addSliderAccess){var sliderAccessArgs=this._defaults.sliderAccessArgs,rtl=this._defaults.isRTL;sliderAccessArgs.isRTL=rtl;setTimeout(function(){if($tp.find('.ui-slider-access').length===0){$tp.find('.ui-slider:visible').sliderAccess(sliderAccessArgs);var sliderAccessWidth=$tp.find('.ui-slider-access:eq(0)').outerWidth(true);if(sliderAccessWidth){$tp.find('table:visible').each(function(){var $g=$(this),oldWidth=$g.outerWidth(),oldMarginLeft=$g.css(rtl?'marginRight':'marginLeft').toString().replace('%',''),newWidth=oldWidth-sliderAccessWidth,newMarginLeft=((oldMarginLeft*newWidth)/oldWidth)+'%',css={width:newWidth,marginRight:0,marginLeft:0};css[rtl?'marginRight':'marginLeft']=newMarginLeft;$g.css(css)})}}},10)}}},_limitMinMaxDateTime:function(dp_inst,adjustSliders){var o=this._defaults,dp_date=new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay);if(!this._defaults.showTimepicker){return}if($.datepicker._get(dp_inst,'minDateTime')!==null&&$.datepicker._get(dp_inst,'minDateTime')!==undefined&&dp_date){var minDateTime=$.datepicker._get(dp_inst,'minDateTime'),minDateTimeDate=new Date(minDateTime.getFullYear(),minDateTime.getMonth(),minDateTime.getDate(),0,0,0,0);if(this.hourMinOriginal===null||this.minuteMinOriginal===null||this.secondMinOriginal===null||this.millisecMinOriginal===null){this.hourMinOriginal=o.hourMin;this.minuteMinOriginal=o.minuteMin;this.secondMinOriginal=o.secondMin;this.millisecMinOriginal=o.millisecMin}if(dp_inst.settings.timeOnly||minDateTimeDate.getTime()==dp_date.getTime()){this._defaults.hourMin=minDateTime.getHours();if(this.hour<=this._defaults.hourMin){this.hour=this._defaults.hourMin;this._defaults.minuteMin=minDateTime.getMinutes();if(this.minute<=this._defaults.minuteMin){this.minute=this._defaults.minuteMin;this._defaults.secondMin=minDateTime.getSeconds();if(this.second<=this._defaults.secondMin){this.second=this._defaults.secondMin;this._defaults.millisecMin=minDateTime.getMilliseconds()}else{if(this.millisec<this._defaults.millisecMin){this.millisec=this._defaults.millisecMin}this._defaults.millisecMin=this.millisecMinOriginal}}else{this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal}}else{this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal}}else{this._defaults.hourMin=this.hourMinOriginal;this._defaults.minuteMin=this.minuteMinOriginal;this._defaults.secondMin=this.secondMinOriginal;this._defaults.millisecMin=this.millisecMinOriginal}}if($.datepicker._get(dp_inst,'maxDateTime')!==null&&$.datepicker._get(dp_inst,'maxDateTime')!==undefined&&dp_date){var maxDateTime=$.datepicker._get(dp_inst,'maxDateTime'),maxDateTimeDate=new Date(maxDateTime.getFullYear(),maxDateTime.getMonth(),maxDateTime.getDate(),0,0,0,0);if(this.hourMaxOriginal===null||this.minuteMaxOriginal===null||this.secondMaxOriginal===null){this.hourMaxOriginal=o.hourMax;this.minuteMaxOriginal=o.minuteMax;this.secondMaxOriginal=o.secondMax;this.millisecMaxOriginal=o.millisecMax}if(dp_inst.settings.timeOnly||maxDateTimeDate.getTime()==dp_date.getTime()){this._defaults.hourMax=maxDateTime.getHours();if(this.hour>=this._defaults.hourMax){this.hour=this._defaults.hourMax;this._defaults.minuteMax=maxDateTime.getMinutes();if(this.minute>=this._defaults.minuteMax){this.minute=this._defaults.minuteMax;this._defaults.secondMax=maxDateTime.getSeconds()}else if(this.second>=this._defaults.secondMax){this.second=this._defaults.secondMax;this._defaults.millisecMax=maxDateTime.getMilliseconds()}else{if(this.millisec>this._defaults.millisecMax){this.millisec=this._defaults.millisecMax}this._defaults.millisecMax=this.millisecMaxOriginal}}else{this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal}}else{this._defaults.hourMax=this.hourMaxOriginal;this._defaults.minuteMax=this.minuteMaxOriginal;this._defaults.secondMax=this.secondMaxOriginal;this._defaults.millisecMax=this.millisecMaxOriginal}}if(adjustSliders!==undefined&&adjustSliders===true){var hourMax=parseInt((this._defaults.hourMax-((this._defaults.hourMax-this._defaults.hourMin)%this._defaults.stepHour)),10),minMax=parseInt((this._defaults.minuteMax-((this._defaults.minuteMax-this._defaults.minuteMin)%this._defaults.stepMinute)),10),secMax=parseInt((this._defaults.secondMax-((this._defaults.secondMax-this._defaults.secondMin)%this._defaults.stepSecond)),10),millisecMax=parseInt((this._defaults.millisecMax-((this._defaults.millisecMax-this._defaults.millisecMin)%this._defaults.stepMillisec)),10);if(this.hour_slider){this.control.options(this,this.hour_slider,'hour',{min:this._defaults.hourMin,max:hourMax});this.control.value(this,this.hour_slider,'hour',this.hour)}if(this.minute_slider){this.control.options(this,this.minute_slider,'minute',{min:this._defaults.minuteMin,max:minMax});this.control.value(this,this.minute_slider,'minute',this.minute)}if(this.second_slider){this.control.options(this,this.second_slider,'second',{min:this._defaults.secondMin,max:secMax});this.control.value(this,this.second_slider,'second',this.second)}if(this.millisec_slider){this.control.options(this,this.millisec_slider,'millisec',{min:this._defaults.millisecMin,max:millisecMax});this.control.value(this,this.millisec_slider,'millisec',this.millisec)}}},_onTimeChange:function(){var hour=(this.hour_slider)?this.control.value(this,this.hour_slider,'hour'):false,minute=(this.minute_slider)?this.control.value(this,this.minute_slider,'minute'):false,second=(this.second_slider)?this.control.value(this,this.second_slider,'second'):false,millisec=(this.millisec_slider)?this.control.value(this,this.millisec_slider,'millisec'):false,timezone=(this.timezone_select)?this.timezone_select.val():false,o=this._defaults,pickerTimeFormat=o.pickerTimeFormat||o.timeFormat,pickerTimeSuffix=o.pickerTimeSuffix||o.timeSuffix;if(typeof(hour)=='object'){hour=false}if(typeof(minute)=='object'){minute=false}if(typeof(second)=='object'){second=false}if(typeof(millisec)=='object'){millisec=false}if(typeof(timezone)=='object'){timezone=false}if(hour!==false){hour=parseInt(hour,10)}if(minute!==false){minute=parseInt(minute,10)}if(second!==false){second=parseInt(second,10)}if(millisec!==false){millisec=parseInt(millisec,10)}var ampm=o[hour<12?'amNames':'pmNames'][0];var hasChanged=(hour!=this.hour||minute!=this.minute||second!=this.second||millisec!=this.millisec||(this.ampm.length>0&&(hour<12)!=($.inArray(this.ampm.toUpperCase(),this.amNames)!==-1))||((this.timezone===null&&timezone!=this.defaultTimezone)||(this.timezone!==null&&timezone!=this.timezone)));if(hasChanged){if(hour!==false){this.hour=hour}if(minute!==false){this.minute=minute}if(second!==false){this.second=second}if(millisec!==false){this.millisec=millisec}if(timezone!==false){this.timezone=timezone}if(!this.inst){this.inst=$.datepicker._getInst(this.$input[0])}this._limitMinMaxDateTime(this.inst,true)}if(useAmpm(o.timeFormat)){this.ampm=ampm}this.formattedTime=$.datepicker.formatTime(o.timeFormat,this,o);if(this.$timeObj){if(pickerTimeFormat===o.timeFormat){this.$timeObj.text(this.formattedTime+pickerTimeSuffix)}else{this.$timeObj.text($.datepicker.formatTime(pickerTimeFormat,this,o)+pickerTimeSuffix)}}this.timeDefined=true;if(hasChanged){this._updateDateTime()}},_onSelectHandler:function(){var onSelect=this._defaults.onSelect||this.inst.settings.onSelect;var inputEl=this.$input?this.$input[0]:null;if(onSelect&&inputEl){onSelect.apply(inputEl,[this.formattedDateTime,this])}},_updateDateTime:function(dp_inst){dp_inst=this.inst||dp_inst;var dt=$.datepicker._daylightSavingAdjust(new Date(dp_inst.selectedYear,dp_inst.selectedMonth,dp_inst.selectedDay)),dateFmt=$.datepicker._get(dp_inst,'dateFormat'),formatCfg=$.datepicker._getFormatConfig(dp_inst),timeAvailable=dt!==null&&this.timeDefined;this.formattedDate=$.datepicker.formatDate(dateFmt,(dt===null?new Date():dt),formatCfg);var formattedDateTime=this.formattedDate;if(this._defaults.timeOnly===true){formattedDateTime=this.formattedTime}else if(this._defaults.timeOnly!==true&&(this._defaults.alwaysSetTime||timeAvailable)){formattedDateTime+=this._defaults.separator+this.formattedTime+this._defaults.timeSuffix}this.formattedDateTime=formattedDateTime;if(!this._defaults.showTimepicker){this.$input.val(this.formattedDate)}else if(this.$altInput&&this._defaults.altFieldTimeOnly===true){this.$altInput.val(this.formattedTime);this.$input.val(this.formattedDate)}else if(this.$altInput){this.$input.val(formattedDateTime);var altFormattedDateTime='',altSeparator=this._defaults.altSeparator?this._defaults.altSeparator:this._defaults.separator,altTimeSuffix=this._defaults.altTimeSuffix?this._defaults.altTimeSuffix:this._defaults.timeSuffix;if(this._defaults.altFormat)altFormattedDateTime=$.datepicker.formatDate(this._defaults.altFormat,(dt===null?new Date():dt),formatCfg);else altFormattedDateTime=this.formattedDate;if(altFormattedDateTime)altFormattedDateTime+=altSeparator;if(this._defaults.altTimeFormat)altFormattedDateTime+=$.datepicker.formatTime(this._defaults.altTimeFormat,this,this._defaults)+altTimeSuffix;else altFormattedDateTime+=this.formattedTime+altTimeSuffix;this.$altInput.val(altFormattedDateTime)}else{this.$input.val(formattedDateTime)}this.$input.trigger("change")},_onFocus:function(){if(!this.$input.val()&&this._defaults.defaultValue){this.$input.val(this._defaults.defaultValue);var inst=$.datepicker._getInst(this.$input.get(0)),tp_inst=$.datepicker._get(inst,'timepicker');if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!=inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.datepicker.log(err)}}}}},_controls:{slider:{create:function(tp_inst,obj,unit,val,min,max,step){var rtl=tp_inst._defaults.isRTL;return obj.prop('slide',null).slider({orientation:"horizontal",value:rtl?val*-1:val,min:rtl?max*-1:min,max:rtl?min*-1:max,step:step,slide:function(event,ui){tp_inst.control.value(tp_inst,$(this),unit,rtl?ui.value*-1:ui.value);tp_inst._onTimeChange()},stop:function(event,ui){tp_inst._onSelectHandler()}})},options:function(tp_inst,obj,unit,opts,val){if(tp_inst._defaults.isRTL){if(typeof(opts)=='string'){if(opts=='min'||opts=='max'){if(val!==undefined)return obj.slider(opts,val*-1);return Math.abs(obj.slider(opts))}return obj.slider(opts)}var min=opts.min,max=opts.max;opts.min=opts.max=null;if(min!==undefined)opts.max=min*-1;if(max!==undefined)opts.min=max*-1;return obj.slider(opts)}if(typeof(opts)=='string'&&val!==undefined)return obj.slider(opts,val);return obj.slider(opts)},value:function(tp_inst,obj,unit,val){if(tp_inst._defaults.isRTL){if(val!==undefined)return obj.slider('value',val*-1);return Math.abs(obj.slider('value'))}if(val!==undefined)return obj.slider('value',val);return obj.slider('value')}},select:{create:function(tp_inst,obj,unit,val,min,max,step){var sel='<select class="ui-timepicker-select" data-unit="'+unit+'" data-min="'+min+'" data-max="'+max+'" data-step="'+step+'">',ul=tp_inst._defaults.timeFormat.indexOf('t')!==-1?'toLowerCase':'toUpperCase',m=0;for(var i=min;i<=max;i+=step){sel+='<option value="'+i+'"'+(i==val?' selected':'')+'>';if(unit=='hour'&&useAmpm(tp_inst._defaults.pickerTimeFormat||tp_inst._defaults.timeFormat))sel+=$.datepicker.formatTime("hh TT",{hour:i},tp_inst._defaults);else if(unit=='millisec'||i>=10)sel+=i;else sel+='0'+i.toString();sel+='</option>'}sel+='</select>';obj.children('select').remove();$(sel).appendTo(obj).change(function(e){tp_inst._onTimeChange();tp_inst._onSelectHandler()});return obj},options:function(tp_inst,obj,unit,opts,val){var o={},$t=obj.children('select');if(typeof(opts)=='string'){if(val===undefined)return $t.data(opts);o[opts]=val}else o=opts;return tp_inst.control.create(tp_inst,obj,$t.data('unit'),$t.val(),o.min||$t.data('min'),o.max||$t.data('max'),o.step||$t.data('step'))},value:function(tp_inst,obj,unit,val){var $t=obj.children('select');if(val!==undefined)return $t.val(val);return $t.val()}}}});$.fn.extend({timepicker:function(o){o=o||{};var tmp_args=Array.prototype.slice.call(arguments);if(typeof o=='object'){tmp_args[0]=$.extend(o,{timeOnly:true})}return $(this).each(function(){$.fn.datetimepicker.apply($(this),tmp_args)})},datetimepicker:function(o){o=o||{};var tmp_args=arguments;if(typeof(o)=='string'){if(o=='getDate'){return $.fn.datepicker.apply($(this[0]),tmp_args)}else{return this.each(function(){var $t=$(this);$t.datepicker.apply($t,tmp_args)})}}else{return this.each(function(){var $t=$(this);$t.datepicker($.timepicker._newInst($t,o)._defaults)})}}});$.datepicker.parseDateTime=function(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings){var parseRes=parseDateTimeInternal(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings);if(parseRes.timeObj){var t=parseRes.timeObj;parseRes.date.setHours(t.hour,t.minute,t.second,t.millisec)}return parseRes.date};$.datepicker.parseTime=function(timeFormat,timeString,options){var o=extendRemove(extendRemove({},$.timepicker._defaults),options||{});var strictParse=function(f,s,o){var getPatternAmpm=function(amNames,pmNames){var markers=[];if(amNames){$.merge(markers,amNames)}if(pmNames){$.merge(markers,pmNames)}markers=$.map(markers,function(val){return val.replace(/[.*+?|()\[\]{}\\]/g,'\\$&')});return'('+markers.join('|')+')?'};var getFormatPositions=function(timeFormat){var finds=timeFormat.toLowerCase().match(/(h{1,2}|m{1,2}|s{1,2}|l{1}|t{1,2}|z|'.*?')/g),orders={h:-1,m:-1,s:-1,l:-1,t:-1,z:-1};if(finds){for(var i=0;i<finds.length;i++){if(orders[finds[i].toString().charAt(0)]==-1){orders[finds[i].toString().charAt(0)]=i+1}}}return orders};var regstr='^'+f.toString().replace(/([hH]{1,2}|mm?|ss?|[tT]{1,2}|[lz]|'.*?')/g,function(match){switch(match.charAt(0).toLowerCase()){case'h':return'(\\d?\\d)';case'm':return'(\\d?\\d)';case's':return'(\\d?\\d)';case'l':return'(\\d?\\d?\\d)';case'z':return'(z|[-+]\\d\\d:?\\d\\d|\\S+)?';case't':return getPatternAmpm(o.amNames,o.pmNames);default:return'('+match.replace(/\'/g,"").replace(/(\.|\$|\^|\\|\/|\(|\)|\[|\]|\?|\+|\*)/g,function(m){return"\\"+m})+')?'}}).replace(/\s/g,'\\s?')+o.timeSuffix+'$',order=getFormatPositions(f),ampm='',treg;treg=s.match(new RegExp(regstr,'i'));var resTime={hour:0,minute:0,second:0,millisec:0};if(treg){if(order.t!==-1){if(treg[order.t]===undefined||treg[order.t].length===0){ampm='';resTime.ampm=''}else{ampm=$.inArray(treg[order.t].toUpperCase(),o.amNames)!==-1?'AM':'PM';resTime.ampm=o[ampm=='AM'?'amNames':'pmNames'][0]}}if(order.h!==-1){if(ampm=='AM'&&treg[order.h]=='12'){resTime.hour=0}else{if(ampm=='PM'&&treg[order.h]!='12'){resTime.hour=parseInt(treg[order.h],10)+12}else{resTime.hour=Number(treg[order.h])}}}if(order.m!==-1){resTime.minute=Number(treg[order.m])}if(order.s!==-1){resTime.second=Number(treg[order.s])}if(order.l!==-1){resTime.millisec=Number(treg[order.l])}if(order.z!==-1&&treg[order.z]!==undefined){var tz=treg[order.z].toUpperCase();switch(tz.length){case 1:tz=o.timezoneIso8601?'Z':'+0000';break;case 5:if(o.timezoneIso8601){tz=tz.substring(1)=='0000'?'Z':tz.substring(0,3)+':'+tz.substring(3)}break;case 6:if(!o.timezoneIso8601){tz=tz=='Z'||tz.substring(1)=='00:00'?'+0000':tz.replace(/:/,'')}else{if(tz.substring(1)=='00:00'){tz='Z'}}break}resTime.timezone=tz}return resTime}return false};var looseParse=function(f,s,o){try{var d=new Date('2012-01-01 '+s);return{hour:d.getHours(),minutes:d.getMinutes(),seconds:d.getSeconds(),millisec:d.getMilliseconds(),timezone:$.timepicker.timeZoneOffsetString(d)}}catch(err){try{return strictParse(f,s,o)}catch(err2){$.datepicker.log("Unable to parse \ntimeString: "+s+"\ntimeFormat: "+f)}}return false};if(typeof o.parse==="function"){return o.parse(timeFormat,timeString,o)}if(o.parse==='loose'){return looseParse(timeFormat,timeString,o)}return strictParse(timeFormat,timeString,o)};$.datepicker.formatTime=function(format,time,options){options=options||{};options=$.extend({},$.timepicker._defaults,options);time=$.extend({hour:0,minute:0,second:0,millisec:0,timezone:'+0000'},time);var tmptime=format,ampmName=options.amNames[0],hour=parseInt(time.hour,10);if(hour>11){ampmName=options.pmNames[0]}tmptime=tmptime.replace(/(?:HH?|hh?|mm?|ss?|[tT]{1,2}|[lz]|('.*?'|".*?"))/g,function(match){switch(match){case'HH':return('0'+hour).slice(-2);case'H':return hour;case'hh':return('0'+convert24to12(hour)).slice(-2);case'h':return convert24to12(hour);case'mm':return('0'+time.minute).slice(-2);case'm':return time.minute;case'ss':return('0'+time.second).slice(-2);case's':return time.second;case'l':return('00'+time.millisec).slice(-3);case'z':return time.timezone===null?options.defaultTimezone:time.timezone;case'T':return ampmName.charAt(0).toUpperCase();case'TT':return ampmName.toUpperCase();case't':return ampmName.charAt(0).toLowerCase();case'tt':return ampmName.toLowerCase();default:return match.replace(/\'/g,"")||"'"}});tmptime=$.trim(tmptime);return tmptime};$.datepicker._base_selectDate=$.datepicker._selectDate;$.datepicker._selectDate=function(id,dateStr){var inst=this._getInst($(id)[0]),tp_inst=this._get(inst,'timepicker');if(tp_inst){tp_inst._limitMinMaxDateTime(inst,true);inst.inline=inst.stay_open=true;this._base_selectDate(id,dateStr);inst.inline=inst.stay_open=false;this._notifyChange(inst);this._updateDatepicker(inst)}else{this._base_selectDate(id,dateStr)}};$.datepicker._base_updateDatepicker=$.datepicker._updateDatepicker;$.datepicker._updateDatepicker=function(inst){var input=inst.input[0];if($.datepicker._curInst&&$.datepicker._curInst!=inst&&$.datepicker._datepickerShowing&&$.datepicker._lastInput!=input){return}if(typeof(inst.stay_open)!=='boolean'||inst.stay_open===false){this._base_updateDatepicker(inst);var tp_inst=this._get(inst,'timepicker');if(tp_inst){tp_inst._addTimePicker(inst);if(tp_inst._defaults.useLocalTimezone){var date=new Date(inst.selectedYear,inst.selectedMonth,inst.selectedDay,12);selectLocalTimeZone(tp_inst,date);tp_inst._onTimeChange()}}}};$.datepicker._base_doKeyPress=$.datepicker._doKeyPress;$.datepicker._doKeyPress=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,'timepicker');if(tp_inst){if($.datepicker._get(inst,'constrainInput')){var ampm=useAmpm(tp_inst._defaults.timeFormat),dateChars=$.datepicker._possibleChars($.datepicker._get(inst,'dateFormat')),datetimeChars=tp_inst._defaults.timeFormat.toString().replace(/[hms]/g,'').replace(/TT/g,ampm?'APM':'').replace(/Tt/g,ampm?'AaPpMm':'').replace(/tT/g,ampm?'AaPpMm':'').replace(/T/g,ampm?'AP':'').replace(/tt/g,ampm?'apm':'').replace(/t/g,ampm?'ap':'')+" "+tp_inst._defaults.separator+tp_inst._defaults.timeSuffix+(tp_inst._defaults.showTimezone?tp_inst._defaults.timezoneList.join(''):'')+(tp_inst._defaults.amNames.join(''))+(tp_inst._defaults.pmNames.join(''))+dateChars,chr=String.fromCharCode(event.charCode===undefined?event.keyCode:event.charCode);return event.ctrlKey||(chr<' '||!dateChars||datetimeChars.indexOf(chr)>-1)}}return $.datepicker._base_doKeyPress(event)};$.datepicker._base_updateAlternate=$.datepicker._updateAlternate;$.datepicker._updateAlternate=function(inst){var tp_inst=this._get(inst,'timepicker');if(tp_inst){var altField=tp_inst._defaults.altField;if(altField){var altFormat=tp_inst._defaults.altFormat||tp_inst._defaults.dateFormat,date=this._getDate(inst),formatCfg=$.datepicker._getFormatConfig(inst),altFormattedDateTime='',altSeparator=tp_inst._defaults.altSeparator?tp_inst._defaults.altSeparator:tp_inst._defaults.separator,altTimeSuffix=tp_inst._defaults.altTimeSuffix?tp_inst._defaults.altTimeSuffix:tp_inst._defaults.timeSuffix,altTimeFormat=tp_inst._defaults.altTimeFormat!==null?tp_inst._defaults.altTimeFormat:tp_inst._defaults.timeFormat;altFormattedDateTime+=$.datepicker.formatTime(altTimeFormat,tp_inst,tp_inst._defaults)+altTimeSuffix;if(!tp_inst._defaults.timeOnly&&!tp_inst._defaults.altFieldTimeOnly){if(tp_inst._defaults.altFormat)altFormattedDateTime=$.datepicker.formatDate(tp_inst._defaults.altFormat,(date===null?new Date():date),formatCfg)+altSeparator+altFormattedDateTime;else altFormattedDateTime=tp_inst.formattedDate+altSeparator+altFormattedDateTime}$(altField).val(altFormattedDateTime)}}else{$.datepicker._base_updateAlternate(inst)}};$.datepicker._base_doKeyUp=$.datepicker._doKeyUp;$.datepicker._doKeyUp=function(event){var inst=$.datepicker._getInst(event.target),tp_inst=$.datepicker._get(inst,'timepicker');if(tp_inst){if(tp_inst._defaults.timeOnly&&(inst.input.val()!=inst.lastVal)){try{$.datepicker._updateDatepicker(inst)}catch(err){$.datepicker.log(err)}}}return $.datepicker._base_doKeyUp(event)};$.datepicker._base_gotoToday=$.datepicker._gotoToday;$.datepicker._gotoToday=function(id){var inst=this._getInst($(id)[0]),$dp=inst.dpDiv;this._base_gotoToday(id);var tp_inst=this._get(inst,'timepicker');selectLocalTimeZone(tp_inst);var now=new Date();this._setTime(inst,now);$('.ui-datepicker-today',$dp).click()};$.datepicker._disableTimepickerDatepicker=function(target){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,'timepicker');$(target).datepicker('getDate');if(tp_inst){tp_inst._defaults.showTimepicker=false;tp_inst._updateDateTime(inst)}};$.datepicker._enableTimepickerDatepicker=function(target){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,'timepicker');$(target).datepicker('getDate');if(tp_inst){tp_inst._defaults.showTimepicker=true;tp_inst._addTimePicker(inst);tp_inst._updateDateTime(inst)}};$.datepicker._setTime=function(inst,date){var tp_inst=this._get(inst,'timepicker');if(tp_inst){var defaults=tp_inst._defaults;tp_inst.hour=date?date.getHours():defaults.hour;tp_inst.minute=date?date.getMinutes():defaults.minute;tp_inst.second=date?date.getSeconds():defaults.second;tp_inst.millisec=date?date.getMilliseconds():defaults.millisec;tp_inst._limitMinMaxDateTime(inst,true);tp_inst._onTimeChange();tp_inst._updateDateTime(inst)}};$.datepicker._setTimeDatepicker=function(target,date,withDate){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,'timepicker');if(tp_inst){this._setDateFromField(inst);var tp_date;if(date){if(typeof date=="string"){tp_inst._parseTime(date,withDate);tp_date=new Date();tp_date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second,tp_inst.millisec)}else{tp_date=new Date(date.getTime())}if(tp_date.toString()=='Invalid Date'){tp_date=undefined}this._setTime(inst,tp_date)}}};$.datepicker._base_setDateDatepicker=$.datepicker._setDateDatepicker;$.datepicker._setDateDatepicker=function(target,date){var inst=this._getInst(target);if(!inst){return}var tp_date=(date instanceof Date)?new Date(date.getTime()):date;this._updateDatepicker(inst);this._base_setDateDatepicker.apply(this,arguments);this._setTimeDatepicker(target,tp_date,true)};$.datepicker._base_getDateDatepicker=$.datepicker._getDateDatepicker;$.datepicker._getDateDatepicker=function(target,noDefault){var inst=this._getInst(target);if(!inst){return}var tp_inst=this._get(inst,'timepicker');if(tp_inst){if(inst.lastVal===undefined){this._setDateFromField(inst,noDefault)}var date=this._getDate(inst);if(date&&tp_inst._parseTime($(target).val(),tp_inst.timeOnly)){date.setHours(tp_inst.hour,tp_inst.minute,tp_inst.second,tp_inst.millisec)}return date}return this._base_getDateDatepicker(target,noDefault)};$.datepicker._base_parseDate=$.datepicker.parseDate;$.datepicker.parseDate=function(format,value,settings){var date;try{date=this._base_parseDate(format,value,settings)}catch(err){date=this._base_parseDate(format,value.substring(0,value.length-(err.length-err.indexOf(':')-2)),settings);$.datepicker.log("Error parsing the date string: "+err+"\ndate string = "+value+"\ndate format = "+format)}return date};$.datepicker._base_formatDate=$.datepicker._formatDate;$.datepicker._formatDate=function(inst,day,month,year){var tp_inst=this._get(inst,'timepicker');if(tp_inst){tp_inst._updateDateTime(inst);return tp_inst.$input.val()}return this._base_formatDate(inst)};$.datepicker._base_optionDatepicker=$.datepicker._optionDatepicker;$.datepicker._optionDatepicker=function(target,name,value){var inst=this._getInst(target),name_clone;if(!inst){return null}var tp_inst=this._get(inst,'timepicker');if(tp_inst){var min=null,max=null,onselect=null,overrides=tp_inst._defaults.evnts,fns={},prop;if(typeof name=='string'){if(name==='minDate'||name==='minDateTime'){min=value}else if(name==='maxDate'||name==='maxDateTime'){max=value}else if(name==='onSelect'){onselect=value}else if(overrides.hasOwnProperty(name)){if(typeof(value)==='undefined'){return overrides[name]}fns[name]=value;name_clone={}}}else if(typeof name=='object'){if(name.minDate){min=name.minDate}else if(name.minDateTime){min=name.minDateTime}else if(name.maxDate){max=name.maxDate}else if(name.maxDateTime){max=name.maxDateTime}for(prop in overrides){if(overrides.hasOwnProperty(prop)&&name[prop]){fns[prop]=name[prop]}}}for(prop in fns){if(fns.hasOwnProperty(prop)){overrides[prop]=fns[prop];if(!name_clone){name_clone=$.extend({},name)}delete name_clone[prop]}}if(name_clone&&isEmptyObject(name_clone)){return}if(min){if(min===0){min=new Date()}else{min=new Date(min)}tp_inst._defaults.minDate=min;tp_inst._defaults.minDateTime=min}else if(max){if(max===0){max=new Date()}else{max=new Date(max)}tp_inst._defaults.maxDate=max;tp_inst._defaults.maxDateTime=max}else if(onselect){tp_inst._defaults.onSelect=onselect}}if(value===undefined){return this._base_optionDatepicker.call($.datepicker,target,name)}return this._base_optionDatepicker.call($.datepicker,target,name_clone||name,value)};var isEmptyObject=function(obj){var prop;for(prop in obj){if(obj.hasOwnProperty(obj)){return false}}return true};var extendRemove=function(target,props){$.extend(target,props);for(var name in props){if(props[name]===null||props[name]===undefined){target[name]=props[name]}}return target};var useAmpm=function(timeFormat){return(timeFormat.indexOf('t')!==-1&&timeFormat.indexOf('h')!==-1)};var convert24to12=function(hour){if(hour>12){hour=hour-12}if(hour==0){hour=12}return String(hour)};var splitDateTime=function(dateFormat,dateTimeString,dateSettings,timeSettings){try{var separator=timeSettings&&timeSettings.separator?timeSettings.separator:$.timepicker._defaults.separator,format=timeSettings&&timeSettings.timeFormat?timeSettings.timeFormat:$.timepicker._defaults.timeFormat,timeParts=format.split(separator),timePartsLen=timeParts.length,allParts=dateTimeString.split(separator),allPartsLen=allParts.length;if(allPartsLen>1){return[allParts.splice(0,allPartsLen-timePartsLen).join(separator),allParts.splice(0,timePartsLen).join(separator)]}}catch(err){$.datepicker.log('Could not split the date from the time. Please check the following datetimepicker options'+"\nthrown error: "+err+"\ndateTimeString"+dateTimeString+"\ndateFormat = "+dateFormat+"\nseparator = "+timeSettings.separator+"\ntimeFormat = "+timeSettings.timeFormat);if(err.indexOf(":")>=0){var dateStringLength=dateTimeString.length-(err.length-err.indexOf(':')-2),timeString=dateTimeString.substring(dateStringLength);return[$.trim(dateTimeString.substring(0,dateStringLength)),$.trim(dateTimeString.substring(dateStringLength))]}else{throw err}}return[dateTimeString,'']};var parseDateTimeInternal=function(dateFormat,timeFormat,dateTimeString,dateSettings,timeSettings){var date;var splitRes=splitDateTime(dateFormat,dateTimeString,dateSettings,timeSettings);date=$.datepicker._base_parseDate(dateFormat,splitRes[0],dateSettings);if(splitRes[1]!==''){var timeString=splitRes[1],parsedTime=$.datepicker.parseTime(timeFormat,timeString,timeSettings);if(parsedTime===null){throw'Wrong time format'}return{date:date,timeObj:parsedTime}}else{return{date:date}}};var selectLocalTimeZone=function(tp_inst,date){if(tp_inst&&tp_inst.timezone_select){tp_inst._defaults.useLocalTimezone=true;var now=typeof date!=='undefined'?date:new Date();var tzoffset=$.timepicker.timeZoneOffsetString(now);if(tp_inst._defaults.timezoneIso8601){tzoffset=tzoffset.substring(0,3)+':'+tzoffset.substring(3)}tp_inst.timezone_select.val(tzoffset)}};$.timepicker=new Timepicker();$.timepicker.timeZoneOffsetString=function(date){var off=date.getTimezoneOffset()*-1,minutes=off%60,hours=(off-minutes)/60;return(off>=0?'+':'-')+('0'+(hours*101).toString()).substr(-2)+('0'+(minutes*101).toString()).substr(-2)};$.timepicker.timeRange=function(startTime,endTime,options){return $.timepicker.handleRange('timepicker',startTime,endTime,options)};$.timepicker.dateTimeRange=function(startTime,endTime,options){$.timepicker.dateRange(startTime,endTime,options,'datetimepicker')};$.timepicker.dateRange=function(startTime,endTime,options,method){method=method||'datepicker';$.timepicker.handleRange(method,startTime,endTime,options)};$.timepicker.handleRange=function(method,startTime,endTime,options){$.fn[method].call(startTime,$.extend({onClose:function(dateText,inst){checkDates(this,endTime,dateText)},onSelect:function(selectedDateTime){selected(this,endTime,'minDate')}},options,options.start));$.fn[method].call(endTime,$.extend({onClose:function(dateText,inst){checkDates(this,startTime,dateText)},onSelect:function(selectedDateTime){selected(this,startTime,'maxDate')}},options,options.end));if(method!='timepicker'&&options.reformat){$([startTime,endTime]).each(function(){var format=$(this)[method].call($(this),'option','dateFormat'),date=new Date($(this).val());if($(this).val()&&date){$(this).val($.datepicker.formatDate(format,date))}})}checkDates(startTime,endTime,startTime.val());function checkDates(changed,other,dateText){if(other.val()&&(new Date(startTime.val())>new Date(endTime.val()))){other.val(dateText)}}selected(startTime,endTime,'minDate');selected(endTime,startTime,'maxDate');function selected(changed,other,option){if(!$(changed).val()){return}var date=$(changed)[method].call($(changed),'getDate');if(date.getTime){$(other)[method].call($(other),'option',option,date)}}return $([startTime.get(0),endTime.get(0)])};$.timepicker.version="1.1.1"})(jQuery);;

// ***************************
// js.compressed/jquery/jquery-ui-timepicker-slider-access-addon.min.js
// ***************************
/*
 * jQuery UI Slider Access
 * By: Trent Richardson [http://trentrichardson.com]
 * Version 0.2
 * Last Modified: 12/12/2011
 *
 * Copyright 2011 Trent Richardson
 * Dual licensed under the MIT and GPL licenses.
 * http://trentrichardson.com/Impromptu/GPL-LICENSE.txt
 * http://trentrichardson.com/Impromptu/MIT-LICENSE.txt
 *
 */
(function($){$.fn.extend({sliderAccess:function(options){options=options||{};options.touchonly=options.touchonly!==undefined?options.touchonly:true;if(options.touchonly===true&&!("ontouchend" in document)){return $(this)}return $(this).each(function(i,obj){var $t=$(this),o=$.extend({},{where:"after",step:$t.slider("option","step"),upIcon:"ui-icon-plus",downIcon:"ui-icon-minus",text:false,upText:"+",downText:"-",buttonset:true,buttonsetTag:"span",speed:150},options),$buttons=$("<"+o.buttonsetTag+' class="ui-slider-access"><button data-icon="'+o.downIcon+'" data-step="-'+o.step+'">'+o.downText+'</button><button data-icon="'+o.upIcon+'" data-step="'+o.step+'">'+o.upText+"</button></"+o.buttonsetTag+">");$buttons.children("button").each(function(j,jobj){var $jt=$(this),timeout=null,increment=function($jt,$t,e){var step=$jt.data("step"),curr=$t.slider("value"),newval=curr+=step*1,minval=$t.slider("option","min"),maxval=$t.slider("option","max");e.preventDefault();if(newval<minval||newval>maxval){return}$t.slider("value",newval);$t.slider("option","slide").call($t,null,{value:newval})};$jt.button({text:o.text,icons:{primary:$jt.data("icon")}}).bind("touchstart mousedown",function(e){increment($jt,$t,e);timeout=setInterval(function(){increment($jt,$t,e)},o.speed)});$(document).bind("touchend mouseup",function(){clearInterval(timeout);return false})});$t[o.where]($buttons);if(o.buttonset){$buttons.removeClass("ui-corner-right").removeClass("ui-corner-left").buttonset();$buttons.eq(0).addClass("ui-corner-left");$buttons.eq(1).addClass("ui-corner-right")}var bOuterWidth=$buttons.css({marginLeft:(o.where=="after"?10:0),marginRight:(o.where=="before"?10:0)}).outerWidth(true)+5;var tOuterWidth=$t.outerWidth(true);$t.css("display","inline-block").width(tOuterWidth-bOuterWidth)})}})})(jQuery);;

// ***************************
// js.compressed/datetimepicker.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["january","february","march","april","may","june","july","august","september","october","november","december","sunday_min","monday_min","tuesday_min","wednesday_min","thursday_min","friday_min","saturday_min","time","now","done","hour","minute"]);window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,[]);(function(){$.datepicker.regional.vb={monthNames:[vBulletin.phrase.get("january"),vBulletin.phrase.get("february"),vBulletin.phrase.get("march"),vBulletin.phrase.get("april"),vBulletin.phrase.get("may"),vBulletin.phrase.get("june"),vBulletin.phrase.get("july"),vBulletin.phrase.get("august"),vBulletin.phrase.get("september"),vBulletin.phrase.get("october"),vBulletin.phrase.get("november"),vBulletin.phrase.get("december")],dayNamesMin:[vBulletin.phrase.get("sunday_min"),vBulletin.phrase.get("monday_min"),vBulletin.phrase.get("tuesday_min"),vBulletin.phrase.get("wednesday_min"),vBulletin.phrase.get("thursday_min"),vBulletin.phrase.get("friday_min"),vBulletin.phrase.get("saturday_min")]};$.datepicker.setDefaults($.datepicker.regional.vb);$.timepicker.regional.vb={timeText:vBulletin.phrase.get("time"),currentText:vBulletin.phrase.get("now"),closeText:vBulletin.phrase.get("done"),hourText:vBulletin.phrase.get("hour"),minuteText:vBulletin.phrase.get("minute")};$.timepicker.setDefaults($.timepicker.regional.vb);$(".js-datepicker").not(".hasDatePicker").datetimepicker({showOn:"both",buttonImage:pageData.baseurl+"/images/calendar-blue.png",buttonImageOnly:true,ampm:true})})();;

// ***************************
// js.compressed/infraction.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["error_adding_infraction","error_adding_warning","error_reversing_infraction","error_sending_private_message","give_infraction_ginfraction","infraction_added","infraction_reversed","please_check_the_box_to_reverse_infraction","please_specify_reason_to_reverse_infraction","received_infraction","received_warning","warning_added"]);vBulletin.infraction=vBulletin.infraction||{};(function(E){var D=E("#infractions-tab");vBulletin.infraction.infractUser=function(K,F){var L=E(this);if(L.data("ajaxstarted")){return false}var J=L.hasClass("js-infraction-received"),H,G,I;if(J){H="received_infraction_form";G="received_infraction";I="receive-infraction-dialog"}else{H="give_infraction_form";G="give_infraction_ginfraction";I="give-infraction-dialog"}L.data("ajaxstarted",true);vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/render/"+H,data:{userid:L.data("userid"),nodeid:L.closest(".js-post-controls").data("node-id")||L.data("nodeid"),userInfraction:L.data("userinfraction")},error_phrase:"error_x",complete:function(){L.data("ajaxstarted",null)},success:function(M){if(E("."+I).length){E("."+I).replaceWith(M)}else{E(M).appendTo(document.body).hide()}var N=E("."+I);N.dialog({title:vBulletin.phrase.get(G),autoOpen:true,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:N.hasClass("error-infraction-dialog")?500:(J?600:700),dialogClass:"dialog-container infraction-dialog-container dialog-box",close:function(){var O=E(".js-editor",this);if(O.length&&vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.destroyEditor(O)}E(this).dialog("destroy").remove()},open:function(){var R=this;if(!J){var V=E(".infraction-send-pm",R);vBulletin.ajaxForm.apply(E(R),[{dataType:"json",error_phrase:"error_adding_infraction",success:function(Z,X,d,f){console.log("Infraction result:");console.dir(Z);var e=(Z.infractionNodeid&&!Z.infractionNodeid.errors),b=(Z.pmNodeid?1:0),c=(Z.pmNodeid&&!Z.pmNodeid.errors),a="",Y="warning";if(e&&(!b||c)){a=Z.isWarning?"warning_added":"infraction_added";Y=""}else{if(e&&b&&!c){a="error_sending_private_message"}else{a=Z.isWarning?"error_adding_warning":"error_adding_infraction"}}openAlertDialog({title:vBulletin.phrase.get("give_infraction_ginfraction"),message:vBulletin.phrase.get(a),iconType:Y});if(e){if(typeof F=="function"){F.apply(L.get(0),[Z])}E(R).dialog("close")}},beforeSerialize:function(X){},beforeSubmit:function(b,Z,h){var g=E(".infraction-level-control option:selected",Z).val();if(g=="0"){if(E.trim(E(".custom-reason",Z).val())==""){T(E(".infraction-level",R));openAlertDialog({title:vBulletin.phrase.get("give_infraction_ginfraction"),message:vBulletin.phrase.get("please_specify_custom_reason"),iconType:"warning",onAfterClose:function(){E(".custom-reason",Z).focus()}});return false}var f=Number(E(".custom-points",Z).val());if(isNaN(f)||f<=0){T(E(".infraction-level",R));openAlertDialog({title:vBulletin.phrase.get("give_infraction_ginfraction"),message:vBulletin.phrase.get("please_specify_custom_points"),iconType:"warning",onAfterClose:function(){E(".custom-points",Z).focus()}});return false}var d=E(".custom-period option:selected",Z).val(),X=Number(E(".custom-expires",Z).val());if(d!="N"&&(isNaN(X)||X<=0)){T(E(".infraction-level",R));openAlertDialog({title:vBulletin.phrase.get("give_infraction_ginfraction"),message:vBulletin.phrase.get("please_specify_custom_expires"),iconType:"warning",onAfterClose:function(){E(".custom-expires",Z).focus()}});return false}}var Y=E(".infraction-ban-reason .ban-reason",R);if(Y.is(":visible")&&!E.trim(Y.val())){T(E(".infraction-ban",R));E(".ban-reason-desc",R).removeClass("h-hide");Y.focus();E(".dialog-content",R).scrollTop(0).scrollTop(E(".infraction-ban-reason",R).position().top);return false}var a=Number(V.data("required"));if(a){var e=false,c=E(".js-editor",Z);if(vBulletin.ckeditor.editorExists(c)){c=vBulletin.ckeditor.getEditor(c);if(!E.trim(c.getData())){e=true}}else{if(!E.trim(c.val())){e=true}}if(e){openAlertDialog({title:vBulletin.phrase.get("give_infraction_ginfraction"),message:vBulletin.phrase.get("please_specify_infraction_pm"),iconType:"warning",onAfterClose:function(){T(V);c.focus()}});return false}}}}]);var Q=function(X){if(X){P.removeClass("h-hide").find("input, select").prop("disabled",false).end().find(".selectBox").removeClass("selectBox-disabled")}else{P.addClass("h-hide").find("input, select").prop("disabled",true).end().find(".selectBox").addClass("selectBox-disabled")}};E(".infraction-level-control",R).on("change",function(b,a,Z){var d=E(this.options[this.selectedIndex]),Z=Z&&Z.length==1?Z:E(this).closest(".infraction-level").find(".infraction-warning-control input");if(!a){if(d.data("allow-warning")){Z.prop("disabled",false).val(this.value).parent().removeClass("h-hide");Q(false)}else{Z.prop("disabled",true).parent().addClass("h-hide");if(this.value=="0"){Q(true);E(".textbox",P).first().focus()}}}var c=0,X=0;if(!Z.prop("checked")&&this.value!="0"){c=Number(d.data("points"))||0;X=1}else{if(this.value=="0"){c=Number(E(".custom-infraction-info .custom-points",R).val())||0;X=1}}var Y=E(".infraction-dashboard-stats").data();if(S(Number(Y.points)+c,Number(Y.infractions)+X)){U(true)}else{U(false)}O()});E(".infraction-warning-control input",R).on("click",function(){(this.checked)?U(false):E(".infraction-level-control",R).trigger("change",[true,this])});E(".custom-points",R).on("change",function(){E(".infraction-level-control",R).trigger("change",[true])});var P=E(".custom-infraction-info",R).removeClass("h-hide");E("select",R).selectBox();P.addClass("h-hide");E(".js-content-entry-panel, .js-editor",V).data("callback",function(){O()});vBulletin.ckeditor.initEditorComponents(V,true);E(".toggle-button",R).on("click",function(b){var Z=E(this),X=Z.closest(".blockrow-head"),a=X.next(".blockrow-body");if(Z.hasClass("expand")){a.show();X.removeClass("collapsed");O()}else{a.hide();X.addClass("collapsed");O()}Z.toggleClass("collapse expand");var Y=Z.attr("title");Z.attr("title",Z.data("toggle-title")).data("toggle-title",Y);return false});var T=function(X){E(".toggle-button.expand",X).trigger("click")};var S=function(Y,X){if(Y==0&&X==0){return false}var Z=false;E(".infraction-ban-list tbody tr",R).each(function(a,b){var c=E(this).data();if((c&&Number(c.points)&&Y>=Number(c.points))||(c&&Number(c.infractions)&&X>=Number(c.infractions))){Z=true;return false}});return Z};var U=function(X){var Y=E(".infraction-ban-reason",R);if(X){Y.removeClass("h-hide");T(E(".infraction-ban",R))}else{Y.addClass("h-hide")}};var W=E(".dialog-content",R),O=function(){if(!W[0]){W[0]=R}W[(W[0].scrollHeight>parseFloat(W.css("max-height")))?"addClass":"removeClass"]("has-scrollbar")};O();E(".infraction-level-control",R).trigger("change")}else{vBulletin.ajaxForm.apply(E(".infraction-reverse-form",R),[{dataType:"json",error_phrase:"error_reversing_infraction",success:function(Y,Z,a,X){openAlertDialog({title:vBulletin.phrase.get("reverse_this_infraction"),message:vBulletin.phrase.get("infraction_reversed")});if(typeof F=="function"){F.apply(L.get(0),[Y])}E(R).dialog("close")},beforeSerialize:function(X){},beforeSubmit:function(Z,Y,X){if(!E(".infraction-nodeid",Y).is(":checked")){openAlertDialog({title:vBulletin.phrase.get("reverse_this_infraction"),message:vBulletin.phrase.get("please_check_the_box_to_reverse_infraction"),iconType:"warning",onAfterClose:function(){E(".infraction-nodeid",Y).focus()}});return false}else{if(!E.trim(E(".infraction-reason",Y).val())){openAlertDialog({title:vBulletin.phrase.get("reverse_this_infraction"),message:vBulletin.phrase.get("please_specify_reason_to_reverse_infraction"),iconType:"warning",onAfterClose:function(){E(".infraction-reason",Y).focus()}});return false}}return true}}]);E(".reverse-infraction",R).on("click",function(){E(".infraction-reverse-form",R).submit()})}E(".close-infraction",R).on("click",function(){E(R).dialog("close")});E(".ckeditor-bare-box.ckeditor-load-on-focus",R).on("focus",function(){vBulletin.ckeditor.initEditor(this.id,{complete:function(X){O()},error:function(X){E("#"+X).prop("disabled",false).removeClass("ckeditor-load-on-focus")}})})}})}})};vBulletin.infraction.loadUserInfractions=function(F){E.post(vBulletin.getAjaxBaseurl()+"/ajax/render/user_infractions",{userid:F.userid,pagenum:F.pageNumber},function(G,L,K){F.container.html(G);if(E(".pagenav-form",D).length){var H=new vBulletin.pagination({context:D,tabParamAsQueryString:false,allowHistory:D.find(".conversation-toolbar-wrapper").data("allow-history")==1,onPageChanged:function(M,N){vBulletin.infraction.loadUserInfractions({container:D,userid:D.data("userid"),pageNumber:M,replaceState:true})}})}if(typeof F.callback=="function"){F.callback(G)}if(F.pushState||F.replaceState){var J=vBulletin.makePaginatedUrl(location.href,F.pageNumber);if(!A){B=D.find(".conversation-toolbar-wrapper").data("allow-history")=="1";A=new vBulletin.history.instance(B)}if(A.isEnabled()){var I={from:"infraction_filter",page:F.pageNumber,tab:D.data("url-path")?D.data("url-path"):"#"+D.attr("id")};A[F.pushState?"pushState":"setDefaultState"](I,document.title,J)}}},"json")};var A,B;vBulletin.infraction.setHistoryStateChange=function(){if(!A){B=D.find(".conversation-toolbar-wrapper").data("allow-history")=="1";A=new vBulletin.history.instance(B)}if(A.isEnabled()){A.setStateChange(function(J){var I=A.getState();if(I.data.from=="infraction_filter"){A.log(I.data,I.title,I.url);var F=D.closest(".ui-tabs"),H=F.find(".ui-tabs-nav > li").filter('li:has(a[href*="#{0}"])'.format(D.attr("id")));if(H.hasClass("ui-tabs-selected")){vBulletin.infraction.loadUserInfractions({container:D,userid:D.data("userid"),pageNumber:I.data.page,pushState:false})}else{var G=H.index();vBulletin.selectTabByIndex.call(F,G)}}},"infraction_filter")}};vBulletin.infraction.markInfractions=function(){var F,G,H;E(".infractions-list .list-item").each(function(){H=E(this);G=H.data("nodeId");F=vBulletin.cookie.fetchBbarrayCookie("discussion_view",G);if(F){H.addClass("read")}})};E(document).off("click",".js-post-control__infraction").on("click",".js-post-control__infraction",function(F){vBulletin.infraction.infractUser.apply(this,[F,function(H){var J=E(this),G=J.find(".b-icon"),I=J.hasClass("js-infraction-received");G.removeClass("b-icon__tickets--neutral b-icon__tickets--warned b-icon__tickets--infracted");if(I){J.removeClass("js-infraction-received").attr("title",vBulletin.phrase.get("give_infraction_ginfraction"));G.addClass("b-icon__tickets--neutral")}else{J.addClass("js-infraction-received");if(H.isWarning){J.attr("title",vBulletin.phrase.get("received_warning"));G.addClass("b-icon__tickets--warned")}else{J.attr("title",vBulletin.phrase.get("received_infraction"));G.addClass("b-icon__tickets--infracted")}}}])});D.off("click",".infractionCtrl").on("click",".infractionCtrl",function(F){vBulletin.infraction.infractUser.apply(this,[F,function(G){vBulletin.infraction.loadUserInfractions({container:D,userid:E(this).data("userid"),pageNumber:1,pushState:Number(E('.pagenav-form input[name="page"]',D).val())!=1})}])});D.on("click",".view-infraction",function(F){vBulletin.infraction.infractUser.apply(this,[F,function(G){var H=Number(E('.pagenav-form input[name="page"]',D).val())||1;vBulletin.infraction.loadUserInfractions({container:D,userid:E(this).data("userid"),pageNumber:H,pushState:H!=1})}])});E(document).off("click","#privateMessageContainer .action-buttons .view-infraction").on("click","#privateMessageContainer .action-buttons .view-infraction",function(F){vBulletin.infraction.infractUser.apply(this,[F,function(G){}])});E(".infraction-delete").off("click").on("click",function(H){$button=E(this);var F,G=false;if($button.parents("#pmFloatingBarContent").hasClass("infractions-paginator")){F=getSelectedMessages()}else{F=[E("#privateMessageContainer .js-conversation-starter").data("nodeId")];G=true}if(F.length>0){openConfirmDialog({title:vBulletin.phrase.get("messages_header"),message:vBulletin.phrase.get("are_you_sure_delete_infractions"),iconType:"warning",onClickYes:function(){vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/deleteNodes",data:{nodeids:F,hard:0},success:function(I){if(G){location.href=E("#pmBtnBackToInfractions").prop("href")}else{location.reload()}}})}})}});E(".infraction-mark_as_read").off("click").on("click",function(I){var H=this;var G=getSelectedMessages();if(G.length>0){if(pageData.threadmarking=="0"||pageData.userid=="0"){for(var F in G){vBulletin.cookie.setBbarrayCookie("discussion_view",G[F],Math.round(new Date().getTime()/1000));E("[data-node-id={0}]".format(G[F]),".infractions-list").addClass("read").find(".privateMessageActionCheck").attr("checked",false)}}else{vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markReadMultiple",data:{nodeids:G},success:function(J){E(J).each(function(){E("[data-node-id={0}]".format(this),".infractions-list").addClass("read").find(".privateMessageActionCheck").attr("checked",false);var K=E("[data-node-id={0}]".format(this),".infractions-list");K.addClass("read");K.find(".privateMessageActionCheck").attr("checked",false)})}})}}});E(".infraction-mark_as_unread").off("click").on("click",function(I){var H=this;var G=getSelectedMessages();console.log(G);if(G.length>0){if(pageData.threadmarking=="0"||pageData.userid=="0"){for(var F in G){vBulletin.cookie.unsetBbarrayCookie("discussion_view",G[F]);E("[data-node-id={0}]".format(G[F]),".infractions-list").removeClass("read").find(".privateMessageActionCheck").attr("checked",false)}}else{vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markUnreadMultiple",data:{nodeids:G},success:function(J){E(J).each(function(){E("[data-node-id={0}]".format(this),".infractions-list").removeClass("read").find(".privateMessageActionCheck").attr("checked",false)})}})}}});E(document).ready(function(){if(E(".infractions-list").length>0){if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.infraction.markInfractions()}}if(E("#pmBtnBackToInfractions").length>0){var F=E("#privateMessageContainer .conversation-list .b-post--infraction").data("nodeId");if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.cookie.setBbarrayCookie("discussion_view",F,Math.round(new Date().getTime()/1000))}else{vBulletin.AJAX({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markRead",data:{nodeid:F}})}}});E("#infractionFilters").trigger("reset").find(".filter-options input").off("click").on("click",function(F){infractionsFilter.apply(this)});E(document).off("click","#privatemessagePaging .infractionsPrev").on("click","#privatemessagePaging .infractionsPrev",function(G){G.preventDefault();var F=E(this).closest("#privatemessagePaging").find(':input[type=hidden][name="prev-page"]').val();C(E(this),F)});E(document).off("click","#privatemessagePaging .infractionsNext").on("click","#privatemessagePaging .infractionsNext",function(G){G.preventDefault();var F=E(this).closest("#privatemessagePaging").find(':input[type=hidden][name="next-page"]').val();C(E(this),F)});E(document).off("keypress","#privatemessagePaging .infractionsPageTo").on("keypress","#privatemessagePaging .infractionsPageTo",function(G){if(G.keyCode==13){G.preventDefault();var H=E(this);var F=parseInt(H.val(),10);if(isNaN(F)){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_page_number"),iconType:"error"});return false}C(H,F)}});function C(F,I,N){if(!F){F=E("#private-message-toolbar .infractions-paginator .infractionsPageTo");if(F.length==0){return false}}if(!N){N=0}var K=F.closest(".infractions-paginator");var M=E("#privateMessageContainer .main-pane .pending-posts-container");var H=K.find("#maxPageNum").filter(":input[type=hidden]").val();var J=parseInt(K.find(":input[type=hidden][name=pagenum]").val(),10);var L=parseInt(K.find(":input[type=hidden][name=per-page]").val(),10);I=parseInt(I,10);if(isNaN(I)||isNaN(H)||isNaN(J)){return false}if((I<1)||(I>H)){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("please_enter_a_valid_page_number"),iconType:"error"});return false}else{if((I==J)&&!N){return false}}var G={setCurrentPage:I,setPerPage:L,getPagingInfo:N,options:{}};E("#infractionFilters input:checked").each(function(){G.options[this.name]=this.value});if(G.options.time){G.options.time={from:G.options.time}}E.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/privatemessage_infraction_main",type:"POST",data:G,dataType:"json",success:function(Q){M.html(Q);if(E(".infractions-list").length>0){if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.infraction.markInfractions()}}var P=0;var O=0;if(I<H){if(I>1){O=I+1;P=I-1}else{O=I+1}}else{P=I-1}K.find(":input[type=hidden][name=pagenum]").val(I);K.find(":input[type=hidden][name=next-page]").val(O);K.find(":input[type=hidden][name=prev-page]").val(P);if(O){K.find(".infractionsNext").removeClass("h-disabled")}else{K.find(".infractionsNext").addClass("h-disabled")}if(P){K.find(".infractionsPrev").removeClass("h-disabled")}else{K.find(".infractionsPrev").addClass("h-disabled")}K.find(".infractionsPageTo").val(I);if(N){var R=E("#privateMessageContainer .main-pane .pending-posts-container .pending-posts-pageinfo");K.find("#maxPageNum").filter(":input[type=hidden]").val(parseInt(R.find(".totalpages").val(),10));K.find(".infractionsPageCount").text(parseInt(R.find(".totalpages").val(),10));E(".folder-list .folder-item.pending-posts .count",$pmWidget).text(parseInt(R.find(".totalcount").val(),10))}},error:function(){openAlertDialog({title:vBulletin.phrase.get("error"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}})}infractionsFilter=function(G){$paginateButton=E("#private-message-toolbar .infractions-paginator .infractionsPageTo");if($paginateButton.length){C($paginateButton,1,true);return }var F={};E(this).closest(".filter-options-list").find("input:checked").each(function(){F[this.name]=E(this).val()});if(F.time){F.time={from:F.time}}E(this).attr("checked","checked");F.page=1;F.perpage=pmPerPage;var H={options:F};E.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/render/privatemessage_infraction_main",type:"post",dataType:"json",data:H,success:function(I){E("#privateMessageContainer .pending-posts-container").html(I);pmPageNum=1;if(E(".infractions-list").length>0){if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.infraction.markInfractions()}}}})};E(document).ready(function(){if(E("#infractionBtnReply").length){vBulletin.conversation.replyWithQuotes.getPostReplyButtonSelector=function(){return"#infractionBtnReply"}}})})(jQuery);;

// ***************************
// js.compressed/conversation.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.phrase.precache=$.merge(window.vBulletin.phrase.precache,["cancel_new_with_quote","create_new_conversation_with_quote","error_fetching_comments","error_fetching_quotes","error_x","existing_message_will_be_deleted","invalid_server_response_please_try_again","new_with_quote","please_click_on_the_quote_icon_of_the_post_you_want_to_quote","post_reply","visitor_message","x_comment","x_comments_lower","your_post_is_now_being_reviewed_and_waiting_for_moderators_approval"]);(function(A){var B=[".forum-conversation-content-widget",".group-conversation-content-widget",".blog-conversation-content-widget",".profile-widget","#privateMessageContainer .infractions"];if(!vBulletin.pageHasSelectors(B)){return false}vBulletin.conversation=vBulletin.conversation||{};vBulletin.conversation.contentEntryBox=vBulletin.conversation.contentEntryBox||{};vBulletin.conversation.fetchQuotes=function(C){if(C.nodeIds.length>0){A("body").css("cursor","wait");A.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/fetch-quotes",data:({nodeid:C.nodeIds}),type:"POST",dataType:"json",complete:function(E,D){console.log("fetch-quotes complete.");A("body").css("cursor","auto");if(typeof C.onComplete=="function"){C.onComplete(E,D)}},success:function(D,F,G){console.log("fetch-quotes successful! result:"+JSON.stringify(D));if(D){var E="";A.each(D,function(I,H){E+=JShtmlEncode(H)+"<br/><br/>"});if(typeof C.onSuccess=="function"){C.onSuccess(A.trim(E),F,G)}}else{if(typeof C.onError=="function"){C.onError(G,F,D)}}},error:function(F,E,D){console.log("fetch-quotes failed! error:"+D);if(typeof C.onError=="function"){C.onError(F,E,D)}}})}};vBulletin.conversation.replyWithQuotes={getPostReplyButtonSelector:function(){return"#btnPostReply-top"},getPostReplyQuoteCountSelector:function(){return".post-reply-btn .button-text-secondary"},getSlideoutSelector:function(){return".conversation-reply-slideout"},getTabsSelector:function(){return this.getSlideoutSelector()+" .content-entry-box-reply .ui-tabs-panel.pane"},getButtonSelector:function(){return this.getTabsSelector()+" form .action-buttons .h-right .button.primary"},getPrimaryButtonSelector:function(){return this.getButtonSelector()+".primary"},getQuotesButtonSelector:function(){return this.getPrimaryButtonSelector()+".add-more-quotes"},getVisibleQuotesButtonSelector:function(){return this.getTabsSelector()+":visible form .action-buttons .h-right .button.primary.add-more-quotes"},getSubmitButtonSelector:function(){return this.getPrimaryButtonSelector()+".submit"},getSelectedQuotesSelector:function(){return".b-post-control__quote--selected"},getTabsCountSelector:function(){return"div.content-entry-box-reply ul.content-entry-box-tabs li"},getContentEntryBoxTabCount:function(){return A(this.getTabsCountSelector()).length},sliderIsVisible:function(){return this.isVisible(this.getSlideoutSelector())&&A(this.getSlideoutSelector()).closest(".conversation-toolbar-wrapper").length==1},isVisible:function(C){if(A(C).length==0||A(C).hasClass("h-hide")||A(C).css("display").toLowerCase()==="none"){return false}else{return true}},hideElement:function(C){if(A(C).length==1&&A(C).css("display").toLowerCase()==="none"&&!A(C).hasClass("h-hide")){A(C).addClass("h-hide")}},addSubmitEventToForm:function(){var C=this.getTabsSelector()+" form.editor-form";A(C).each(function(){if(!A(this).hasClass("quote")){A(this).addClass("quote").on("submit",function(){return vBulletin.conversation.replyWithQuotes.clickSubmitButton(A(this))})}})},clickPostReplyButton:function(C){if(C===1){A(this.getPostReplyButtonSelector()).click()}},clickQuoteIcon:function(C){this.setPostReplyButtonStyle(C);this.clickPostReplyButton(C);this.addSubmitEventToForm();this.refreshEditorContent(C)},clickAddMoreQuotesButton:function(C){if(vBulletin.ckeditor.editorExists(C)){vBulletin.ckeditor.getEditor(C).setData("")}A(this.getSlideoutSelector()).slideUp("slow",function(){A(this).addClass("h-hide")})},refreshEditorContent:function(E){if(E==0){var C=A(".js-content-entry").last();if(C.length==1){var F=A(".js-editor",C);var D=F.attr("id");editorIsInitialized=vBulletin.ckeditor.editorExists(D);if(editorIsInitialized){vBulletin.ckeditor.getEditor(D).setData("")}}}},clickCancelButton:function(){this.clearSelectedQuotes();return true},clickSubmitButton:function(C){this.clearSelectedQuotes();return true},isQuoteSelected:function(){if(A(this.getSelectedQuotesSelector()).length>0){return true}else{return false}},clearSelectedQuotes:function(){if(this.isQuoteSelected()){A(this.getSelectedQuotesSelector()).each(function(C){A(this).removeClass("b-post-control__quote--selected")})}this.setPostReplyButtonStyle(0)},setPostReplyButtonStyle:function(D){var C=A(this.getPostReplyQuoteCountSelector());if(D>0){C.text("("+D+")").closest(".button").addClass("special").removeClass("light")}else{C.text("").closest(".button").removeClass("special").addClass("light")}},showAddWithQuotesButton:function(){var C=this.getQuotesButtonSelector();if(this.isQuoteSelected()){A(C).removeClass("h-hide")}else{A(C).addClass("h-hide")}},editorExists:function(){if(this.getContentEntryBoxTabCount()){return true}else{return false}}};vBulletin.conversation.showPostLink=function(D){var C=A(this);if(this.tagName.toLowerCase()=="span"){C=C.parent()}C.qtip({content:{title:{text:vBulletin.phrase.get("share_post_link_help"),button:true},text:'<input type="text" class="textbox stretch" value="'+C.attr("href")+'" />'},position:{my:"right top",at:"left top",viewport:A(window)},show:{event:"click",solo:true},events:{show:function(F,E){},visible:function(F,E){E.elements.content.find("input.textbox").focus().select()},hide:function(F,E){}},hide:{event:"unfocus",fixed:true},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-sharepostlink"}});C.qtip("api").show()};vBulletin.conversation.initialCommentCountToDisplay=1;vBulletin.conversation.init=function(){var G=A(".conversation-content-widget"),J=A(".conversation-toolbar-wrapper",G).data("allow-history")=="1";var I=G.filter(".widget-tabs").tabs({selected:(A(".conversation-stream-view",G).length==1?1:0)});I.find(".widget-header .widget-tabs-nav li.ui-state-default:not(.ui-tabs-selected) a").off("click").on("click",function(){location.href=A(this).attr("data-href");return false});var L=new vBulletin.pagination({context:G,allowHistory:J,onPageChanged:function(P,R,O){M.updatePageNumber(P);if(!R){var Q=M.getOption("customFilter");if(Q){Q.pagenum=P;delete M.lastFilters;if(O){delete Q[A(".toolbar-search-form .js-filter-search",G).attr("name")]}}M.applyFilters(false,false,false,true)}Responsive.ConversationContent.checkForSignature()}});var D=A(".conversation-toolbar-wrapper.scrolltofixed-floating",G);var K=function(){if(G.length>0){var O=(G.offset().top+(G.outerHeight()-parseFloat(G.css("border-bottom-width")))-D.height());return O}return 0};try{var N=new vBulletin.scrollToFixed({element:D,limit:K()})}catch(C){}var M=new vBulletin.conversation.filter({context:G,scrollToTop:G,pagination:L,allowHistory:J,hash:G.find(".js-module-top-anchor").attr("id"),onContentLoad:function(){N.updateLimit(K())}});var E=function(){var Q=A(".b-post-control__quote--selected",G);if(Q.length>0){var P=[];Q.each(function(T){P.push(A(this).parent().attr("data-node-id"))});var O=function(V,T){var U;console.log("setQuotes: start");if(vBulletin.ckeditor.editorExists(V)){U=vBulletin.ckeditor.getEditor(V);if(U){console.log("setQuotes: remove data");U.setData("",function(){console.log("setQuotes: insert quotes data");U.insertHtml(T.replace(/(\n)/gi,"<br />"));U.focus()})}}else{V.val(T.replace(/\<br(\s*\/|)\>/gi,"\n")).focus()}};var R={nodeIds:P,onSuccess:function(T){var U=A(".js-content-entry .js-editor",G).last();O(U,T)},onError:function(){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_fetching_quotes"),iconType:"error"})}};vBulletin.conversation.fetchQuotes.apply(self,[R])}else{var S=A(".js-content-entry .js-editor",G).last();if(vBulletin.ckeditor.editorExists(S)){vBulletin.ckeditor.getEditor(S).focus()}else{S.focus()}}};A(document).off("click",".b-post__count").on("click",".b-post__count",function(O){O.preventDefault();vBulletin.conversation.showPostLink.apply(O.target,[O])});A(".conversation-toolbar .post-reply-btn").click(function(T,V){var U=A(".js-content-entry").last(),X=this;if(U.length==1){var S=A(".js-editor",U),P=U.offset().top,R=A(".conversation-toolbar-wrapper"),W=R.hasClass("scrolltofixed"),O=R.outerHeight(true),Q=vBulletin.ckeditor.editorExists(S);if(!W){P+=O}if(Q){E.apply(X)}else{vBulletin.ckeditor.initEditor(S,{complete:function(){E.apply(X)}})}vBulletin.animateScrollTop(P,{duration:500,complete:function(){if(Q){vBulletin.ckeditor.focusEditor(S)}}})}});A(".conversation-toolbar .new-quote-btn").click(function(T,R){if(A(".b-post-control__quote--selected").length==0){openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("please_click_on_the_quote_icon_of_the_post_you_want_to_quote")});return false}var Q=this;var P=A(".content-entry-box",G);var S=P.offset().top;var O=A(".content-entry-box .pane:visible .ckeditor-bare-box",G).first().attr("id");if(!R&&((vBulletin.ckeditor.editorExists(O)&&vBulletin.ckeditor.getEditor(O).getData()!="")||(!vBulletin.ckeditor.requiredScriptsLoaded&&A.trim(A("#"+O).val())!=""))){openConfirmDialog({title:vBulletin.phrase.get("new_with_quote"),message:vBulletin.phrase.get("existing_message_will_be_deleted"),iconType:"warning",onClickYes:function(){if(vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.getEditor(O).setData("")}else{A("#"+O).val("")}A(Q).triggerHandler("click",true)},onClickNo:function(){vBulletin.animateScrollTop(S,{duration:500,complete:function(){if(vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.getEditor(O).focus()}else{A("#"+O).focus()}}})}});return false}G.addClass("new-with-quote");A("#breadcrumbs .crumb:last").clone().html(vBulletin.phrase.get("new_with_quote")).after(A("#breadcrumbs .crumbSeparator:first").clone()).appendTo(A("#breadcrumbs"));A("form button[name=btnSubmit]",P).html(vBulletin.phrase.get("submit"));A("form input[name=parentid]",P).val(pageData.channelid);A("form .title-field",P).val("");A("button.cancel",P).off("click").on("click",function(U){openConfirmDialog({title:vBulletin.phrase.get("cancel_new_with_quote"),message:vBulletin.phrase.get("existing_message_will_be_deleted"),iconType:"warning",onClickYes:function(){location.reload()}})});if(!vBulletin.ckeditor.editorExists(O)){vBulletin.ckeditor.initEditor(O,{complete:function(){E.apply(Q)}})}else{E.apply(Q)}S=P.offset().top;vBulletin.animateScrollTop(S,{duration:500,complete:function(){}})});A(".conversation-reply-slideout .action-buttons .cancel").click(function(){var O=function(){vBulletin.conversation.replyWithQuotes.showAddWithQuotesButton()};var P=A(this).closest("form").find("textarea").eq(0).attr("id");if((vBulletin.ckeditor.editorExists(P)&&vBulletin.ckeditor.getEditor(P).getData()!="")||(!vBulletin.ckeditor.editorExists(P)&&A.trim(A("#"+P).val())!="")){var Q=(A(this).closest(".canvas-widget").hasClass("conversation-content-widget"))?"post_reply":"visitor_message";openConfirmDialog({title:vBulletin.phrase.get(Q),message:vBulletin.phrase.get("existing_message_will_be_deleted"),iconType:"warning",onClickYes:function(){vBulletin.conversation.replyWithQuotes.clickCancelButton();if(vBulletin.ckeditor.editorExists(P)){vBulletin.ckeditor.getEditor(P).setData("")}else{A("#"+P).val("")}A(".conversation-toolbar-wrapper .conversation-reply-slideout").slideUp(400,O)},onClickNo:function(){}});return false}if(vBulletin.ckeditor.editorExists(P)){}A(".conversation-toolbar-wrapper .conversation-reply-slideout").slideUp(400,O)});A(document).off("mouseover",".js-userinfo__signature").on("mouseover",".js-userinfo__signature",function(){if(A(this).data("qtip-initialized")=="1"){return }A(this).data("qtip-initialized","1");var O=A(this).find(".user-signature");if(A.trim(O.html()).length==0){O=A(this).closest(".list-item").find(".post-signature")}A(this).qtip({content:O,position:{my:"top left",at:"bottom center"},style:{classes:"ui-tooltip-shadow ui-tooltip-light ui-tooltip-rounded ui-tooltip-signature"},hide:{event:"unfocus"},show:{solo:true}});A(this).trigger("mouseover")});var H=A(".conversation-list",G);A(".js-post-controls",H).disableSelection();H.off("click",".js-post-control__quote").on("click",".js-post-control__quote",function(){A(this).toggleClass("b-post-control__quote--selected");var O=A(".post-reply-btn .button-text-secondary");var P=O.text().match(/[0-9]+/);P=P?Number(P[0]):0;if(A(this).hasClass("b-post-control__quote--selected")){P++}else{P--}vBulletin.conversation.replyWithQuotes.clickQuoteIcon(P)});H.off("click",".js-post__history").on("click",".js-post__history",vBulletin.conversation.showPostHistory);H.off("click",".js-post-control__ip-address").on("click",".js-post-control__ip-address",vBulletin.conversation.showIp);H.off("click",".js-post-control__vote").on("click",".js-post-control__vote",function(O){if(A(O.target).closest(".bubble-flyout").length==1){vBulletin.conversation.showWhoVoted.apply(O.target,[O])}else{vBulletin.conversation.votePost.apply(this,[O])}return false});H.off("click",".js-post-control__edit").on("click",".js-post-control__edit",vBulletin.conversation.editPost);H.off("click",".js-post-control__flag").on("click",".js-post-control__flag",vBulletin.conversation.flagPost);H.off("click",".js-post-control__comment").on("click",".js-post-control__comment",function(O){vBulletin.conversation.toggleCommentBox.apply(this,[O])});if((typeof (vBulletin.inlinemod)!="undefined")&&(typeof (vBulletin.inlinemod.init)=="function")){vBulletin.inlinemod.init(G)}H.off("click",".js-comment-entry__post").on("click",".js-comment-entry__post",function(O){vBulletin.conversation.postComment.apply(this,[O,function(X){if(X){if(X.redirecturl){location.replace(X.redirecturl);return }if(X.needmod){A(this).closest(".js-comment-entry").find(".js-comment-entry__textbox").val("").trigger("update.elastic");showStatusMessage(vBulletin.phrase.get("your_post_is_now_being_reviewed_and_waiting_for_moderators_approval"),"moderate");return }var U=A(this).closest(".js-post"),P=X.totalcomments,T=Math.ceil(P/vBulletin.conversation.COMMENTS_PER_PAGE),V=U.find(".js-comments").removeClass("h-hide"),Q=U.find(".js-comments__comments");A(this).closest(".js-comment-entry").addClass("b-comment-entry--has-comments").find(".js-comment-entry__textbox").val("").trigger("update.elastic");var R=A(X.template).appendTo(Q);V.find(".js-comments__footer").addClass("h-hide");V.find(".js-comments__page--prev").show().data("page-num",1).prev("label").hide();V.find(".js-comments__header").removeClass("h-hide").find(".js-comments__pagination").removeClass(function(){return(P>1)?"h-hide":""}).end().find(".js-comments__total-text").text(function(){var Y=P>1?"x_comments_lower":"x_comment";return vBulletin.phrase.get(Y,P)});var S=U.closest(".ui-tabs-panel").find(".conversation-toolbar-wrapper");if(S.hasClass("scrolltofixed-floating")){var W=S.data("object-instance");if(W){W.addLimit(R.outerHeight(true))}}vBulletin.scrollToAnchor("#post"+X.nodeId)}}])});H.off("click",".js-comments__page--prev, .js-comments__page--next").on("click",".js-comments__page--prev, .js-comments__page--next",function(){A("body").css("cursor","wait");var S=A(this);var O=S.closest(".js-post");var T=O.find(".js-comments");var P=T.find(".js-comments__comments");var R=Number(S.data("page-num"))||0;var Q=S.closest(".canvas-widget").attr("data-widget-instance-id");A.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/fetch-comments",data:({page:R,parentid:O.attr("data-node-id"),postindex:O.find(".js-post__content .b-post__count").text().replace("#",""),widgetInstanceId:Q,isblogcomment:S.closest(".blog-list").length==1?1:0,isarticlecomment:S.closest(".article-list").length==1?1:0}),type:"POST",dataType:"json",complete:function(V,U){console.log("fetch-comments complete.");A("body").css("cursor","auto")},success:function(d,W,c){console.log("fetch-comments successful! result:"+JSON.stringify(d));if(d){if(!d.error){if(d.templates){var X=A("<ul />").attr("class",P.attr("class")),V=d.totalcomments;A.each(d.templates,function(e,f){X.append(f)});P.replaceWith(X);var a=Number(X.find(".js-comment:first-child .b-post__count span").text().replace(/\D/g,"")),b=Number(X.find(".js-comment:last-child .b-post__count span").text().replace(/\D/g,"")),Y=Math.ceil(V/vBulletin.conversation.COMMENTS_PER_PAGE),U,Z;if(S.hasClass("js-comments__page--prev")){U=S;Z=T.find(".js-comments__page--next")}else{U=T.find(".js-comments__page--prev");Z=S}R=d.page;T.find(".js-comments__header").find(".js-comments__pagination > label").show().text(function(){return(a==b)?a:"{0} - {1}".format(a,b)});if(R==1){T.find(".js-comments__footer").addClass("h-hide")}else{a=b+1;b=a+vBulletin.conversation.COMMENTS_PER_PAGE-1;b=(b>V)?V:b;T.find(".js-comments__footer").removeClass("h-hide").find(".js-comments__pagination > label").text(function(){return(a==b)?a:"{0} - {1}".format(a,b)})}U.data("page-num",R+1);Z.data("page-num",((R-1)||1));U.removeClass("h-hide-imp")[Y>R?"show":"hide"]().prev("label").show();Z[R>1?"show":"hide"]()}}else{openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_x",d.error),iconType:"warning"})}}else{openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}},error:function(W,V,U){console.log("fetch-comments failed! error:"+U);openAlertDialog({title:vBulletin.phrase.get("conversation"),message:vBulletin.phrase.get("error_fetching_comments"),iconType:"error"})}})});A(".content-entry-box form").trigger("reset");vBulletin.conversation.bindEditFormEventHandlers("text");vBulletin.conversation.bindEditFormEventHandlers("comment");var F=pageData.nodeid;if(pageData.threadmarking=="0"||pageData.userid=="0"){vBulletin.cookie.setBbarrayCookie("discussion_view",F,Math.round(new Date().getTime()/1000))}else{A.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/markRead",data:{nodeid:F},type:"POST",dataType:"json",complete:function(){},success:function(O){if(O&&!O.error){console.log("Topic "+F+" is marked read successfully!")}else{console.log("Topic "+F+" is marked read failed: "+O.error)}},error:function(Q,P,O){console.log("Topic "+F+" is marked read failed:"+O)}})}A.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/incrementNodeview",data:{nodeid:F},type:"POST",dataType:"json",complete:function(){},success:function(O){if(O&&!O.error){console.log("View count incremented for topic "+F+"!")}else{console.log("Failed to increment view count for topic "+F+": "+O.error)}},error:function(Q,P,O){console.log("Failed to increment view count for topic "+F+": "+O)}});if((location.href.indexOf("edit=1")!=-1)&&pageData.nodeid&&pageData.nodeid>0){A("#edit-"+pageData.nodeid).trigger("click")}A(document).off("change",".js-article-content-pagenav").on("change",".js-article-content-pagenav",function(){window.location.href=A(this).val()})};A(document).ready(function(){vBulletin.conversation.init()})})(jQuery);;

// ***************************
// js.compressed/subscribe.js
// ***************************
window.vBulletin=window.vBulletin||{};window.vBulletin.phrase=window.vBulletin.phrase||{};window.vBulletin.phrase.precache=window.vBulletin.phrase.precache||[];window.vBulletin.options=window.vBulletin.options||{};window.vBulletin.options.precache=window.vBulletin.options.precache||[];window.vBulletin.options.precache=$.merge(window.vBulletin.options.precache,[]);(function(){vBulletin.subscribe={};vBulletin.subscribe.subscribe=function(A){if($(A).hasClass("isSubscribed")||$(A).hasClass("is-pending")){return true}var E=parseInt($(A).attr("data-node-id"),10),D={},B="";if($(A).hasClass("is-topic")){B="/ajax/api/follow/add";D.follow_item=E;D.type="follow_contents";vBulletin.subscribe.subscribeRequest(A,B,D)}else{var C={};C.channelid=E;C.recipient=parseInt($(A).attr("data-owner-id"),10);if($(A).hasClass("is-blog-channel")){C.requestType="member"}else{if($(A).hasClass("is-sg-channel")){C.requestType="sg_subscriber"}else{C.requestType="subscriber"}}vBulletin.AJAX({url:pageData.baseurl+"/ajax/api/node/requestChannel",data:C,success:function(F){vBulletin.subscribe.subscribeRequestSuccess(A,F)},error:function(){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("follow_error"),iconType:"error"})}})}};vBulletin.subscribe.subscribeRequest=function(A,B,C){$.ajax({url:pageData.baseurl+B,data:C,type:"POST",dataType:"json",success:function(D){vBulletin.subscribe.subscribeRequestSuccess(A,D)},error:function(){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("follow_error"),iconType:"error"})}})};vBulletin.subscribe.subscribeRequestSuccess=function(B,A){if(!isNaN(A)&&A==1){$(B).children(".button-text-primary").text(vBulletin.phrase.get("following"));$(B).addClass("isSubscribed special").removeClass("secondary");location.reload()}else{if(!isNaN(A)&&A>1){$(B).children(".button-text-primary").text(vBulletin.phrase.get("following_pending"));$(B).addClass("is-pending special").removeClass("secondary");location.reload()}else{if(A.errors){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get(A.errors[0][0]),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("follow_error"),iconType:"error"})}}}};vBulletin.subscribe.join=function(A){var C=parseInt($(A).attr("data-node-id"),10),B=parseInt($(A).attr("data-owner-id"),10);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/node/requestChannel",data:({channelid:C,recipient:B,requestType:"sg_member"}),type:"POST",dataType:"json",success:function(D){if(D.errors){openAlertDialog({title:vBulletin.phrase.get("join"),message:vBulletin.phrase.get(D.errors[0]),iconType:"error"})}else{if(D===true){$(A).children(".button-text-primary").text(vBulletin.phrase.get("joined"));$(A).addClass("has-joined special").removeClass("secondary");location.reload()}else{if(!isNaN(D)){$(A).children(".button-text-primary").text(vBulletin.phrase.get("following_pending"));$(A).addClass("is-pending special").removeClass("secondary")}}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("join"),message:vBulletin.phrase.get("join_error"),iconType:"error"})}})};vBulletin.subscribe.leave=function(A){var B=parseInt($(A).attr("data-node-id"),10);$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/blog/leaveChannel",data:({channelId:B}),type:"POST",dataType:"json",success:function(C){if(C.errors){openAlertDialog({title:vBulletin.phrase.get("leave"),message:vBulletin.phrase.get(C.errors[0]),iconType:"error"})}else{if(C===true){var D=$(A);if(D.hasClass("follow-btn")){D.children(".button-text-primary").text(vBulletin.phrase.get("follow"));D.removeClass("isSubscribed unfollow-btn");D.addClass("special")}else{D.children(".button-text-primary").text(vBulletin.phrase.get("join"));D.removeClass("has-joined special")}location.reload()}else{openAlertDialog({title:vBulletin.phrase.get("leave"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("leave"),message:vBulletin.phrase.get("invalid_server_response_please_try_again"),iconType:"error"})}})};vBulletin.subscribe.unsubscribe=function(A){var B=$(A).attr("data-node-id");$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/follow/delete",data:({follow_item:B,type:"follow_contents"}),type:"POST",dataType:"json",success:function(C){if(C==1){$(A).removeClass("isSubscribed unfollow-btn special").addClass("secondary").children(".button-text-primary").text(vBulletin.phrase.get("follow"));location.reload()}else{if(C.errors){openAlertDialog({title:vBulletin.phrase.get("following_remove"),message:vBulletin.phrase.get(C.errors[0][0]),iconType:"error"})}else{openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("unfollow_error"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("follow"),message:vBulletin.phrase.get("unfollow_error"),iconType:"error"})}})};vBulletin.subscribe.getUnsubscribeOverlay=function(G){var H="",A=$(G).closest(".list-item").find("ul.unfollow_panel").filter(function(){var I=parseInt($(this).attr("data-node-id"),10);if(typeof I=="number"){H=I;return true}}),F=A.children(),D=false,C=false,B=false,E="";$.each(F,function(I,J){if($(J).hasClass("unfollow_content")){C=$(J).attr("data-item-id")}else{if($(J).hasClass("unfollow_member")){D=$(J).attr("data-item-id")}else{if($(J).hasClass("unfollow_channel")){B=$(J).attr("data-item-id")}}}});if(C){E+="&content="+C}if(D){E+="&member="+D}if(B){E+="&channel="+B}if(H){$.ajax({url:vBulletin.getAjaxBaseurl()+"/profile/getUnsubscribeOverlay?userId="+pageData.userid+E+"&nodeId="+H,success:function(I){var J=$(".unsubscribe-overlay-container");if(J){J.html(I);J.children(".unsubscribe-overlay").dialog({title:vBulletin.phrase.get("following_remove"),autoOpen:false,modal:true,resizable:false,closeOnEscape:false,showCloseButton:false,width:450,dialogClass:"dialog-container unsubscribe-dialog-container dialog-box"}).dialog("open")}},error:function(){openAlertDialog({title:vBulletin.phrase.get("following_remove"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}})}};vBulletin.subscribe.removeUnsubscribeOptions=function(E,B){var D=$(E).parents(".unsubscribe-overlay"),F=parseInt(D.attr("data-node-id"),10),C=$(D).children(".unsubscribe-options"),A=[];if(typeof F!="number"){return false}var G="li :checkbox[name=unsubscribeItems]";if(!(($(C).find("li #"+F+"-unsubscribeAll:checkbox:checked")).length===1)){G+=":checked"}$.each($(C).find(G),function(H,K){var I=$(K).attr("data-type"),J=parseInt($(K).attr("data-item-id"),10);if(J&&typeof J=="number"){A.push({type:I,itemId:J})}});if(A.length>0){$.ajax({url:vBulletin.getAjaxBaseurl()+"/ajax/api/follow/unsubscribeItems",data:({unsubscribeItems:A}),type:"POST",dataType:"json",success:function(H){if(H===true){$(D).dialog("close").remove();B.updatePageNumber(1).applyFilters(false)}else{if(H.errors!=undefined){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}}},error:function(){openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unable_to_contact_server_please_try_again"),iconType:"error"})}})}else{openAlertDialog({title:vBulletin.phrase.get("profile_guser"),message:vBulletin.phrase.get("unsubscribe_overlay_error"),iconType:"error"})}};$(".follow-btn").on("click",function(A){if(!$(this).hasClass("isSubscribed")){vBulletin.subscribe.subscribe(this)}else{if($(this).hasClass("unfollow-btn")){if($(this).hasClass("is-blog-channel")){vBulletin.subscribe.leave(this)}else{vBulletin.subscribe.unsubscribe(this)}}}});$(".follow-btn").on("mouseover",function(A){if($(this).hasClass("isSubscribed")&&!$(this).hasClass("is-owner")){$(this).addClass("unfollow-btn secondary").removeClass("special");var B=vBulletin.phrase.get("following_remove");$(this).children(".button-text-primary").text(B)}});$(".follow-btn").on("mouseout",function(A){if($(this).hasClass("unfollow-btn")){$(this).removeClass("unfollow-btn secondary").addClass("special");var B=vBulletin.phrase.get("following");$(this).children(".button-text-primary").text(B)}});$(".share-btn").on("click",function(A){alert("Not yet implemented");return false});$(".join-btn").on("click",function(A){if(!$(this).hasClass("has-joined")&&!$(this).hasClass("is-pending")){vBulletin.subscribe.join(this)}else{if($(this).hasClass("leave-btn")&&!$(this).hasClass("is-owner")){vBulletin.subscribe.leave(this)}}});$(".join-btn").on("mouseover",function(A){if($(this).hasClass("has-joined")&&!$(this).hasClass("is-owner")){$(this).addClass("leave-btn secondary").removeClass("special");var B=vBulletin.phrase.get("leave");$(this).children(".button-text-primary").text(B)}});$(".join-btn").on("mouseout",function(A){if($(this).hasClass("leave-btn")&&!$(this).hasClass("is-owner")){$(this).removeClass("leave-btn secondary").addClass("special");var B=vBulletin.phrase.get("joined");$(this).children(".button-text-primary").text(B)}})})();;

