mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-23 07:03:26 +03:00
7 lines
42 KiB
JavaScript
7 lines
42 KiB
JavaScript
/* qTip2 v2.0.1-70- tips modal viewport svg imagemap ie6 | qtip2.com | Licensed MIT, GPL | Mon Apr 15 2013 22:46:59 */
|
|
(function(t,e,o){(function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):jQuery&&!jQuery.fn.qtip&&t(jQuery)})(function(s){function n(t,e,i,o){this.id=i,this.target=t,this.tooltip=L,this.elements=elements={target:t},this._id=$+"-"+i,this.timers={img:{}},this.options=e,this.plugins={},this.cache=cache={event:{},target:s(),disabled:I,attr:o,onTarget:I,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=I}function r(t){return t===L||!s.isPlainObject(t)}function a(t){return!s.isFunction(t)&&(!t&&!t.attr||1>t.length||"object"==typeof t&&!t.jquery&&!t.then)}function l(t){var e,i,o,n;return r(t)?I:(r(t.metadata)&&(t.metadata={type:t.metadata}),"content"in t&&(e=t.content,(r(e)||e.jquery||e.done)&&(e=t.content={text:i=a(e)?I:e}),"ajax"in e&&(o=e.ajax,n=o&&o.once!==I,e.ajax=null,e.text=function(t,e){var r=s.ajax(s.extend({},o,{context:e})).then(function(t){return n&&e.set("content.text",t),t},function(t,i,o){e.destroyed||0===t.status||e.set("content.text",i+": "+o)});return n?i||s(this).attr(e.options.content.attr)||"Loading...":r}),"title"in e&&(r(e.title)||(e.button=e.title.button,e.title=e.title.text),a(e.title||I)&&(e.title=I))),"position"in t&&r(t.position)&&(t.position={my:t.position,at:t.position}),"show"in t&&r(t.show)&&(t.show=t.show.jquery?{target:t.show}:t.show===k?{ready:k}:{event:t.show}),"hide"in t&&r(t.hide)&&(t.hide=t.hide.jquery?{target:t.hide}:{event:t.hide}),"style"in t&&r(t.style)&&(t.style={classes:t.style}),s.each(j,function(){this.sanitize&&this.sanitize(t)}),t)}function h(t,e){for(var i,o=0,s=t,n=e.split(".");s=s[n[o++]];)n.length>o&&(i=s);return[i||t,n.pop()]}function c(t,e){var i,o,s;for(i in this.checks)for(o in this.checks[i])(s=RegExp(o,"i").exec(t))&&(e.push(s),("builtin"===i||this.plugins[i])&&this.checks[i][o].apply(this.plugins[i]||this,e))}function d(t){return Y.concat("").join(t?"-"+t+" ":" ")}function p(t){if(this.tooltip.hasClass(J))return I;clearTimeout(this.timers.show),clearTimeout(this.timers.hide);var e=s.proxy(function(){this.toggle(k,t)},this);this.options.show.delay>0?this.timers.show=setTimeout(e,this.options.show.delay):e()}function u(t){if(this.tooltip.hasClass(J))return I;var e=s(t.relatedTarget),i=e.closest(G)[0]===this.tooltip[0],o=e[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==e[0]&&"mouse"===this.options.position.target&&i||this.options.hide.fixed&&/mouse(out|leave|move)/.test(t.type)&&(i||o))try{t.preventDefault(),t.stopImmediatePropagation()}catch(n){}else{var r=s.proxy(function(){this.toggle(I,t)},this);this.options.hide.delay>0?this.timers.hide=setTimeout(r,this.options.hide.delay):r()}}function f(t){return this.tooltip.hasClass(J)?I:(clearTimeout(this.timers.inactive),this.timers.inactive=setTimeout(s.proxy(function(){this.hide(t)},this),this.options.hide.inactive),o)}function g(t){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(t)}function m(t,i,o){var r,a,h,c,d,p=s(e.body),u=t[0]===e?p:t,f=t.metadata?t.metadata(o.metadata):L,g="html5"===o.metadata.type&&f?f[o.metadata.name]:L,m=t.data(o.metadata.name||"qtipopts");try{m="string"==typeof m?s.parseJSON(m):m}catch(v){}if(c=s.extend(k,{},T.defaults,o,"object"==typeof m?l(m):L,l(g||f)),a=c.position,c.id=i,"boolean"==typeof c.content.text){if(h=t.attr(c.content.attr),c.content.attr===I||!h)return I;c.content.text=h}if(a.container.length||(a.container=p),a.target===I&&(a.target=u),c.show.target===I&&(c.show.target=u),c.show.solo===k&&(c.show.solo=a.container.closest("body")),c.hide.target===I&&(c.hide.target=u),c.position.viewport===k&&(c.position.viewport=a.container),a.container=a.container.eq(0),a.at=new j.Corner(a.at,k),a.my=new j.Corner(a.my),t.data($))if(c.overwrite)t.qtip("destroy");else if(c.overwrite===I)return I;return t.attr(B,!0),c.suppress&&(d=t.attr("title"))&&t.removeAttr("title").attr(Z,d).attr("title",""),r=new n(t,c,i,!!h),t.data($,r),t.one("remove.qtip-"+i+" removeqtip.qtip-"+i,function(){var t;(t=s(this).data($))&&t.destroy()}),r}function v(t){return t.charAt(0).toUpperCase()+t.slice(1)}function y(t,e){return parseInt(oe(t,e),10)}function b(t,e,i){var o,s,n,r=e.precedance===S,a=t[r?0:1],l=t[r?1:0],h=e.string().indexOf(D)>-1,c=a*(h?.5:1),d=Math.pow,p=Math.round,u=Math.sqrt(d(c,2)+d(l,2)),f=[i/c*u,i/l*u];return f[2]=Math.sqrt(d(f[0],2)-d(i,2)),f[3]=Math.sqrt(d(f[1],2)-d(i,2)),o=u+f[2]+f[3]+(h?0:f[0]),s=o/u,n=[p(s*a),p(s*l)],r?n:n.reverse()}function w(t,e,i){var o=Math.ceil(e/2),s=Math.ceil(i/2),n={bottomright:[[0,0],[e,i],[e,0]],bottomleft:[[0,0],[e,0],[0,i]],topright:[[0,i],[e,0],[e,i]],topleft:[[0,0],[0,i],[e,i]],topcenter:[[0,i],[o,0],[e,i]],bottomcenter:[[0,0],[e,0],[o,i]],rightcenter:[[0,0],[e,s],[0,i]],leftcenter:[[e,0],[e,i],[0,s]]};return n.lefttop=n.bottomright,n.righttop=n.bottomleft,n.leftbottom=n.topright,n.rightbottom=n.topleft,n[t.string()]}function x(t){function e(){g[0]=d.height,g[1]=d.width}function i(){g[0]=d.width,g[1]=d.height}function n(){var e=d.corner,i=t.options.position,o=i.at,s=i.my.string?i.my.string():i.my;return e===I||s===I&&o===I?I:(e===k?c.corner=new j.Corner(s):e.string||(c.corner=new j.Corner(e),c.corner.fixed=k),f.corner=new j.Corner(c.corner.string()),"centercenter"!==c.corner.string())}function r(t,e,i){var o=re+v(e?e:t[t.precedance])+"Width";return(i?y(i,o):y(p.content,o)||y(t.y===V&&p.titlebar||p.content,o)||y(u,o))||0}function a(t){var e=re+v(t.y)+v(t.x)+"Radius";return 9>j.ie?0:y(t.y===V&&p.titlebar||p.content,e)||y(p.tooltip,e)||0}function l(t,e){function i(t,e,i){var o=t.css(e);return!o||i&&o===t.css(i)||pe.test(o)?I:o}var o=t.tip.css("cssText",""),n=re+v(e[e.precedance])+v(ae),r=t.titlebar,a=r&&(e.y===V||e.y===D&&o.position().top+g[1]/2+d.offset<r.outerHeight(k)),l=a?r:t.content;m.fill=i(o,le)||i(l,le)||i(t.content,le)||i(u,le)||o.css(le),m.border=i(o,n,ae)||i(l,n,ae)||i(t.content,n,ae)||i(u,n,ae)||u.css(n),s("*",o).add(o).css("cssText",le+":"+he+ce+";"+re+":0"+ce+";")}function h(e,i,s){if(p.tip){var n,a,l=c.corner.clone(),h=s.adjusted,u=t.options.position.adjust.method.split(" "),g=u[0],m=u[1]||u[0],v={left:I,top:I,x:0,y:0},y={};c.corner.fixed!==k&&(g===X&&l.precedance===W&&h.left&&l.y!==D?l.precedance=l.precedance===W?S:W:g!==X&&h.left&&(l.x=l.x===D?h.left>0?P:F:l.x===P?F:P),m===X&&l.precedance===S&&h.top&&l.x!==D?l.precedance=l.precedance===S?W:S:m!==X&&h.top&&(l.y=l.y===D?h.top>0?V:A:l.y===V?A:V),l.string()===f.corner.string()||f.top===h.top&&f.left===h.left||c.update(l,I)),n=c.position(l,h),n[l.x]+=r(l,l.x),n[l.y]+=r(l,l.y),n.right!==o&&(n.left=-n.right),n.bottom!==o&&(n.top=-n.bottom),n.user=Math.max(0,d.offset),(v.left=g===X&&!!h.left)&&(l.x===D?y[ne+"-left"]=v.x=n[ne+"-left"]-h.left:(a=n.right!==o?[h.left,-n.left]:[-h.left,n.left],(v.x=Math.max(a[0],a[1]))>a[0]&&(s.left-=h.left,v.left=I),y[n.right!==o?F:P]=v.x)),(v.top=m===X&&!!h.top)&&(l.y===D?y[ne+"-top"]=v.y=n[ne+"-top"]-h.top:(a=n.bottom!==o?[h.top,-n.top]:[-h.top,n.top],(v.y=Math.max(a[0],a[1]))>a[0]&&(s.top-=h.top,v.top=I),y[n.bottom!==o?A:V]=v.y)),p.tip.css(y).toggle(!(v.x&&v.y||l.x===D&&v.y||l.y===D&&v.x)),s.left-=n.left.charAt?n.user:g!==X||v.top||!v.left&&!v.top?n.left:0,s.top-=n.top.charAt?n.user:m!==X||v.left||!v.left&&!v.top?n.top:0,f.left=h.left,f.top=h.top,f.corner=l.clone()}}var c=this,d=t.options.style.tip,p=t.elements,u=p.tooltip,f={top:0,left:0},g=[d.width,d.height],m={},x=d.border||0;c.corner=L,c.mimic=L,c.border=x,c.offset=d.offset,c.size=g,s.extend(c,{init:function(){var t=n()&&(de||j.ie);return t&&(c.create(),c.update(),u.unbind(se).bind("tooltipmove"+se,h)),t},create:function(){var t,e=g[0],i=g[1];p.tip&&p.tip.remove(),p.tip=s("<div />",{"class":"qtip-tip"}).css({width:e,height:i}).prependTo(u),de?s("<canvas />").appendTo(p.tip)[0].getContext("2d").save():(t=createVML("shape",'coordorigin="0,0"',"position:absolute;"),p.tip.html(t+t),s("*",p.tip).bind("click"+se+" mousedown"+se,function(t){t.stopPropagation()}))},update:function(t,o){var n,a,h,v,y,_=p.tip,C=_.children(),T=g[0],q=g[1],M=d.mimic,z=Math.round;t||(t=f.corner||c.corner),M===I?M=t:(M=new j.Corner(M),M.precedance=t.precedance,"inherit"===M.x?M.x=t.x:"inherit"===M.y?M.y=t.y:M.x===M.y&&(M[t.precedance]=t[t.precedance])),n=M.precedance,t.precedance===W?e():i(),p.tip.css({width:T=g[0],height:q=g[1]}),l(p,t),m.border!==he?(x=r(t),0===d.border&&x>0&&(m.fill=m.border),c.border=x=d.border!==k?d.border:x):c.border=x=0,h=w(M,T,q),c.size=y=b(g,t,x),_.css({width:y[0],height:y[1],lineHeight:y[1]+"px"}),v=t.precedance===S?[z(M.x===P?x:M.x===F?y[0]-T-x:(y[0]-T)/2),z(M.y===V?y[1]-q:0)]:[z(M.x===P?y[0]-T:0),z(M.y===V?x:M.y===A?y[1]-q-x:(y[1]-q)/2)],de?(C.attr({width:y[0],height:y[1]}),a=C[0].getContext("2d"),a.restore(),a.save(),a.clearRect(0,0,3e3,3e3),a.fillStyle=m.fill,a.strokeStyle=m.border,a.lineWidth=2*x,a.lineJoin="miter",a.miterLimit=100,a.translate(v[0],v[1]),a.beginPath(),a.moveTo(h[0][0],h[0][1]),a.lineTo(h[1][0],h[1][1]),a.lineTo(h[2][0],h[2][1]),a.closePath(),x&&("border-box"===u.css("background-clip")&&(a.strokeStyle=m.fill,a.stroke()),a.strokeStyle=m.border,a.stroke()),a.fill()):(h="m"+h[0][0]+","+h[0][1]+" l"+h[1][0]+","+h[1][1]+" "+h[2][0]+","+h[2][1]+" xe",v[2]=x&&/^(r|b)/i.test(t.string())?8===j.ie?2:1:0,C.css({coordsize:T+x+" "+(q+x),antialias:""+(M.string().indexOf(D)>-1),left:v[0],top:v[1],width:T+x,height:q+x}).each(function(t){var e=s(this);e[e.prop?"prop":"attr"]({coordsize:T+x+" "+(q+x),path:h,fillcolor:m.fill,filled:!!t,stroked:!t}).toggle(!(!x&&!t)),!t&&e.html(createVML("stroke",'weight="'+2*x+'px" color="'+m.border+'" miterlimit="1000" joinstyle="miter"'))})),setTimeout(function(){p.tip.css({display:"inline-block",visibility:"visible"})},1),o!==I&&c.position(t)},position:function(t){var e,i,o,n=p.tip,l={},h=Math.max(0,d.offset),f=u.hasClass("ui-widget");return d.corner!==I&&n?(t=t||c.corner,e=t.precedance,i=b(g,t,x),o=[t.x,t.y],e===W&&o.reverse(),s.each(o,function(o,s){var n,c,d;s===D?(n=e===S?P:V,l[n]="50%",l[ne+"-"+n]=-Math.round(i[e===S?0:1]/2)+h):(n=r(t,s,f?u:L),c=r(t,s,f?L:p.content),d=a(t),l[s]=Math.max(-x,o?c:h+(d>n?d:-n)))}),l[t[e]]-=i[e===W?0:1],n.css({top:"",bottom:"",left:"",right:"",margin:""}).css(l),l):I},destroy:function(){u.unbind(se),p.tip&&p.tip.find("*").remove().end().remove(),c.corner=c.mimic=c.size=null}}),c.init()}function _(t){var i,o=this,n=t.options.show.modal,r=t.elements,a=r.tooltip,l=ye+t.id;s.extend(o,{init:function(){return n.on?(i=r.overlay=me.elem,a.addClass(ve).css("z-index",j.modal.zindex+s(ye).length).bind("tooltipshow"+l+" tooltiphide"+l,function(t,e,n){var r=t.originalEvent;if(t.target===a[0])if(r&&"tooltiphide"===t.type&&/mouse(leave|enter)/.test(r.type)&&s(r.relatedTarget).closest(i[0]).length)try{t.preventDefault()}catch(l){}else(!r||r&&!r.solo)&&o.toggle(t,"tooltipshow"===t.type,n)}).bind("tooltipfocus"+l,function(t,e){if(!t.isDefaultPrevented()&&t.target===a[0]){var o=s(ye),n=j.modal.zindex+o.length,r=parseInt(a[0].style.zIndex,10);i[0].style.zIndex=n-1,o.each(function(){this.style.zIndex>r&&(this.style.zIndex-=1)}),o.filter("."+U).qtip("blur",t.originalEvent),a.addClass(U)[0].style.zIndex=n,me.update(e);try{t.preventDefault()}catch(l){}}}).bind("tooltiphide"+l,function(t){t.target===a[0]&&s(ye).filter(":visible").not(a).last().qtip("focus",t)}),o):o},toggle:function(e,i,s){return e&&e.isDefaultPrevented()?o:(me.toggle(t,!!i,s),o)},destroy:function(){a.removeClass(ve),a.add(e).unbind(l),me.toggle(t,I),delete r.overlay}}),o.init()}function C(i){var o,n=this,r=i.elements,a=i.options,l=r.tooltip,h=".ie6-"+i.id,c=1>s("select, object").length,d=I;s.extend(n,{init:function(){var i,a=s(t);c&&(r.bgiframe=s('<iframe class="qtip-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>'),r.bgiframe.appendTo(l),l.bind("tooltipmove"+h,n.adjustBGIFrame)),o=s("<div/>",{id:"qtip-rcontainer"}).appendTo(e.body),n.redraw(),r.overlay&&!d&&(i=function(){r.overlay[0].style.top=a.scrollTop()+"px"},a.bind("scroll.qtip-ie6, resize.qtip-ie6",i),i(),r.overlay.addClass("qtipmodal-ie6fix"),d=k)},adjustBGIFrame:function(){var t,e,o={height:l.outerHeight(I),width:l.outerWidth(I)},s=i.plugins.tip,n=r.tip;e=parseInt(l.css("border-left-width"),10)||0,e={left:-e,top:-e},s&&n&&(t="x"===s.corner.precedance?["width","left"]:["height","top"],e[t[1]]-=n[t[0]]()),r.bgiframe.css(e).css(o)},redraw:function(){if(1>i.rendered||i.drawing)return n;var t,e,s,r,h=a.style,c=a.position.container;return i.drawing=1,h.height&&l.css(E,h.height),h.width?l.css(O,h.width):(l.css(O,"").appendTo(o),e=l.width(),1>e%2&&(e+=1),s=l.css("max-width")||"",r=l.css("min-width")||"",t=(s+r).indexOf("%")>-1?c.width()/100:0,s=(s.indexOf("%")>-1?t:1)*parseInt(s,10)||e,r=(r.indexOf("%")>-1?t:1)*parseInt(r,10)||0,e=s+r?Math.min(Math.max(e,r),s):e,l.css(O,Math.round(e)).appendTo(c)),i.drawing=0,n},destroy:function(){c&&r.bgiframe.remove(),l.unbind(h)}}),n.init()}var T,q,j,M,z,k=!0,I=!1,L=null,W="x",S="y",O="width",E="height",V="top",P="left",A="bottom",F="right",D="center",N="flipinvert",X="shift",$="qtip",B="data-hasqtip",Y=["ui-widget","ui-tooltip"],H={},G="div."+$,R=$+"-default",U=$+"-focus",Q=$+"-hover",J="qtip-disabled",K="_replacedByqTip",Z="oldtitle";q=n.prototype,q.render=function(t){if(this.rendered||this.destroyed)return this;var e=this,i=this.options,o=this.cache,n=this.elements,r=i.content.text,a=i.content.title,l=i.content.button,h=i.position,c=[];return s.attr(this.target[0],"aria-describedby",this._id),this.tooltip=n.tooltip=tooltip=s("<div/>",{id:this._id,"class":[$,R,i.style.classes,$+"-pos-"+i.position.my.abbrev()].join(" "),width:i.style.width||"",height:i.style.height||"",tracking:"mouse"===h.target&&h.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":I,"aria-describedby":this._id+"-content","aria-hidden":k}).toggleClass(J,this.disabled).data($,this).appendTo(h.container).append(n.content=s("<div />",{"class":$+"-content",id:this._id+"-content","aria-atomic":k})),this.rendered=-1,this.positioning=k,a&&(this._createTitle(),s.isFunction(a)||c.push(this._updateTitle(a,I))),l&&this._createButton(),s.isFunction(r)||c.push(this._updateContent(r,I)),this.rendered=k,this._setWidget(),s.each(i.events,function(t,e){s.isFunction(e)&&tooltip.bind("toggle"===t?["tooltipshow","tooltiphide"]:"tooltip"+t,e)}),s.each(j,function(t){var i;"render"===this.initialize&&(i=this(e))&&((e.plugins[t]=i).qtip=e)}),this._assignEvents(),s.when.apply(s,c).then(function(){e._trigger("render"),e.positioning=I,e.hiddenDuringWait||!i.show.ready&&!t||e.toggle(k,o.event,I),e.hiddenDuringWait=I}),this},q.toggle=function(t,i){var o=this.cache,n=this.options,r=this.tooltip;if(i){if(/over|enter/.test(i.type)&&/out|leave/.test(o.event.type)&&n.show.target.add(i.target).length===n.show.target.length&&r.has(i.relatedTarget).length)return this;o.event=s.extend({},i)}if(this.waiting&&!t&&(this.hiddenDuringWait=k),!this.rendered||this.destroyed)return t?this.render(1):this;var a,l,h=t?"show":"hide",c=this.options[h],d=(this.options[t?"hide":"show"],this.options.position),p=this.options.content,u=this.tooltip.css("width"),f=this.tooltip[0].offsetWidth>0,g=t||1===c.target.length,m=!i||2>c.target.length||o.target[0]===i.target;return(typeof t).search("boolean|number")&&(t=!f),a=!r.is(":animated")&&f===t&&m,l=a?L:!!this._trigger(h,[90]),l!==I&&t&&this.focus(i),!l||a?this:(s.attr(r[0],"aria-hidden",!t),t?(o.origin=s.extend({},this.mouse),s.isFunction(p.text)&&this._updateContent(p.text,I),s.isFunction(p.title)&&this._updateTitle(p.title,I),!z&&"mouse"===d.target&&d.adjust.mouse&&(s(e).bind("mousemove."+$,this._storeMouse),z=k),u||r.css("width",r.outerWidth(I)),this.reposition(i,arguments[2]),u||r.css("width",""),c.solo&&("string"==typeof c.solo?s(c.solo):s(G,c.solo)).not(r).not(c.target).qtip("hide",s.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete o.origin,z&&!s(G+'[tracking="true"]:visible',c.solo).not(r).length&&(s(e).unbind("mousemove."+$),z=I),this.blur(i)),after=s.proxy(function(){t?(j.ie&&r[0].style.removeAttribute("filter"),r.css("overflow",""),"string"==typeof c.autofocus&&s(this.options.show.autofocus,r).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):r.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(t?"visible":"hidden")},this),c.effect===I||g===I?(r[h](),after()):s.isFunction(c.effect)?(r.stop(1,1),c.effect.call(r,this),r.queue("fx",function(t){after(),t()})):r.fadeTo(90,t?1:0,after),t&&c.target.trigger("qtip-"+this.id+"-inactive"),this)},q.show=function(t){return this.toggle(k,t)},q.hide=function(t){return this.toggle(I,t)},q.focus=function(t){if(!this.rendered||this.destroyed)return this;var e=s(G),i=this.tooltip,o=parseInt(i[0].style.zIndex,10),n=T.zindex+e.length;return i.hasClass(U)||this._trigger("focus",[n],t)&&(o!==n&&(e.each(function(){this.style.zIndex>o&&(this.style.zIndex=this.style.zIndex-1)}),e.filter("."+U).qtip("blur",t)),i.addClass(U)[0].style.zIndex=n),this},q.blur=function(t){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(U),this._trigger("blur",[this.tooltip.css("zIndex")],t),this)},q.reposition=function(i,o){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=k;var n,r,a=this.cache,l=this.tooltip,h=this.options.position,c=h.target,d=h.my,p=h.at,u=h.viewport,f=h.container,g=h.adjust,m=g.method.split(" "),v=l.outerWidth(I),y=l.outerHeight(I),b=0,w=0,x=l.css("position"),_={left:0,top:0},C=l[0].offsetWidth>0,T=i&&"scroll"===i.type,q=s(t),M=this.mouse;if(s.isArray(c)&&2===c.length)p={x:P,y:V},_={left:c[0],top:c[1]};else if("mouse"===c&&(i&&i.pageX||a.event.pageX))p={x:P,y:V},i=!M||!M.pageX||!g.mouse&&i&&i.pageX?(!i||"resize"!==i.type&&"scroll"!==i.type?i&&i.pageX&&"mousemove"===i.type?i:(!g.mouse||this.options.show.distance)&&a.origin&&a.origin.pageX?a.origin:i:a.event)||i||a.event||M||{}:{pageX:M.pageX,pageY:M.pageY},"static"!==x&&(_=f.offset()),_={left:i.pageX-_.left,top:i.pageY-_.top},g.mouse&&T&&(_.left-=M.scrollX-q.scrollLeft(),_.top-=M.scrollY-q.scrollTop());else{if("event"===c&&i&&i.target&&"scroll"!==i.type&&"resize"!==i.type?a.target=s(i.target):"event"!==c&&(a.target=s(c.jquery?c:elements.target)),c=a.target,c=s(c).eq(0),0===c.length)return this;c[0]===e||c[0]===t?(b=j.iOS?t.innerWidth:c.width(),w=j.iOS?t.innerHeight:c.height(),c[0]===t&&(_={top:(u||c).scrollTop(),left:(u||c).scrollLeft()})):j.imagemap&&c.is("area")?n=j.imagemap(this,c,p,j.viewport?m:I):j.svg&&c[0].ownerSVGElement?n=j.svg(this,c,p,j.viewport?m:I):(b=c.outerWidth(I),w=c.outerHeight(I),_=c.offset()),n&&(b=n.width,w=n.height,r=n.offset,_=n.position),_=j.offset(c,_,f),(j.iOS>3.1&&4.1>j.iOS||j.iOS>=4.3&&4.33>j.iOS||!j.iOS&&"fixed"===x)&&(_.left-=q.scrollLeft(),_.top-=q.scrollTop()),(!n||n&&n.adjustable!==I)&&(_.left+=p.x===F?b:p.x===D?b/2:0,_.top+=p.y===A?w:p.y===D?w/2:0)}return _.left+=g.x+(d.x===F?-v:d.x===D?-v/2:0),_.top+=g.y+(d.y===A?-y:d.y===D?-y/2:0),j.viewport?(_.adjusted=j.viewport(this,_,h,b,w,v,y),r&&_.adjusted.left&&(_.left+=r.left),r&&_.adjusted.top&&(_.top+=r.top)):_.adjusted={left:0,top:0},this._trigger("move",[_,u.elem||u],i)?(delete _.adjusted,o===I||!C||isNaN(_.left)||isNaN(_.top)||"mouse"===c||!s.isFunction(h.effect)?l.css(_):s.isFunction(h.effect)&&(h.effect.call(l,this,s.extend({},_)),l.queue(function(t){s(this).css({opacity:"",height:""}),j.ie&&this.style.removeAttribute("filter"),t()})),this.positioning=I,this):this},q.disable=function(t){return this.destroyed?this:("boolean"!=typeof t&&(t=!(this.tooltip.hasClass(J)||this.disabled)),this.rendered&&this.tooltip.toggleClass(J,t).attr("aria-disabled",t),this.disabled=!!t,this)},q.enable=function(){return this.disable(I)},q.destroy=function(t){function e(){var t=this.target,e=t.attr(Z),i=t.data($);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),s.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),i&&this!==i||(t.removeData($).removeAttr(B).removeAttr("aria-describedby"),this.options.suppress&&e&&t.attr("title",e).removeAttr(Z)),t.unbind("."+this._id),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=H[this.id]=null}return this.destroyed?this.target:(this.destroyed=k,t!==k?tooltip.one("tooltiphidden",s.proxy(e,this)):e.call(this),this.target)},M=q.checks={builtin:{"^id$":function(t,e,i,o){var n=i===k?T.nextid:i,r=$+"-"+n;n!==I&&n.length>0&&!s("#"+r).length?(this._id=r,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):t[e]=o},"^prerender":function(t,e,i){i&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(t,e,i){this._updateContent(i)},"^content.attr$":function(t,e,i,o){this.options.content.text===this.target.attr(o)&&this._updateContent(this.target.attr(i))},"^content.title$":function(t,e,i){return i?(i&&!this.elements.title&&this._createTitle(),this._updateTitle(i),o):this._removeTitle()},"^content.button$":function(t,e,i){this._updateButton(i)},"^content.title.(text|button)$":function(t,e,i){this.set("content."+e,i)},"^position.(my|at)$":function(t,e,i){"string"==typeof i&&(t[e]=new j.Corner(i,"at"===e))},"^position.container$":function(t,e,i){this.tooltip.appendTo(i)},"^show.ready$":function(t,e,i){i&&(!this.rendered&&this.render(k)||this.toggle(k))},"^style.classes$":function(t,e,i){this.tooltip.attr("class",[$,R,i,$+"-pos-"+this.options.position.my.abbrev()].join(" "))},"^style.width|height":function(t,e,i){this.tooltip.css(e,i)},"^style.widget|content.title":function(){this._setWidget()},"^style.def":function(t,e,i){this.tooltip.toggleClass(R,!!i)},"^events.(render|show|move|hide|focus|blur)$":function(t,e,i){tooltip[(s.isFunction(i)?"":"un")+"bind"]("tooltip"+e,i)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var t=this.options.position;tooltip.attr("tracking","mouse"===t.target&&t.adjust.mouse),this._unassignEvents(),this._assignEvents()}}},q.get=function(t){if(this.destroyed)return this;var e=h(this.options,t.toLowerCase()),i=e[0][e[1]];return i.precedance?i.string():i};var te=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,ee=/^prerender|show\.ready/i;q.set=function(t,e){if(this.destroyed)return this;var i,n=this.rendered,r=I,a=this.options;return this.checks,"string"==typeof t?(i=t,t={},t[i]=e):t=s.extend({},t),s.each(t,function(e,i){if(!n&&!ee.test(e))return delete t[e],o;var l,c=h(a,e.toLowerCase());l=c[0][c[1]],c[0][c[1]]="object"==typeof i&&i.nodeType?s(i):i,r=te.test(e)||r,t[e]=[c[0],c[1],i,l]}),l(a),this.positioning=k,s.each(t,s.proxy(c,this)),this.positioning=I,this.rendered&&this.tooltip[0].offsetWidth>0&&r&&this.reposition("mouse"===a.position.target?L:this.cache.event),this},q._update=function(t,e,i){var o=this,n=this.cache;return this.rendered&&t?(s.isFunction(t)&&(t=t.call(this.elements.target,n.event,this)||""),s.isFunction(t.then)?(n.waiting=k,t.then(function(t){return n.waiting=I,o._updateContent(t,i)},null,function(t){return o._updateContent(t,i)})):t===I||!t&&""!==t?I:(t.jquery&&t.length>0?e.empty().append(t.css({display:"block"})):e.html(t),n.waiting=k,e.imagesLoaded().done(function(){n.waiting=I,i!==I&&o.rendered&&o.tooltip[0].offsetWidth>0&&o.reposition(n.event)}).promise())):I},q._updateContent=function(t,e){this._update(t,this.elements.content,e)},q._updateTitle=function(t,e){this._update(t,this.elements.title,e)===I&&this._removeTitle(I)},q._createTitle=function(){var t=this.elements,e=this._id+"-title";t.titlebar&&this._removeTitle(),t.titlebar=s("<div />",{"class":$+"-titlebar "+(this.options.style.widget?d("header"):"")}).append(t.title=s("<div />",{id:e,"class":$+"-title","aria-atomic":k})).insertBefore(t.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(t){s(this).toggleClass("ui-state-active ui-state-focus","down"===t.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(t){s(this).toggleClass("ui-state-hover","mouseover"===t.type)}),this.options.content.button&&this._createButton()},q._removeTitle=function(t){var e=this.elements;e.title&&(e.titlebar.remove(),e.titlebar=e.title=e.button=L,t!==I&&this.reposition())},q._createButton=function(){var t=this,e=this.elements,i=e.tooltip,o=this.options.content.button,n="string"==typeof o,r=n?o:"Close tooltip";e.button&&e.button.remove(),e.button=o.jquery?o:s("<a />",{"class":"qtip-close "+(this.options.style.widget?"":$+"-icon"),title:r,"aria-label":r}).prepend(s("<span />",{"class":"ui-icon ui-icon-close",html:"×"})),e.button.appendTo(e.titlebar||i).attr("role","button").click(function(e){return i.hasClass(J)||t.hide(e),I})},q._updateButton=function(t){if(!this.rendered)return I;var e=this.elements.button;t?this._createButton():e.remove()},q._setWidget=function(){var t=this.options.style.widget,e=this.elements,i=e.tooltip,o=i.hasClass(J);i.removeClass(J),J=t?"ui-state-disabled":"qtip-disabled",i.toggleClass(J,o),i.toggleClass("ui-helper-reset "+d(),t).toggleClass(R,this.options.style.def&&!t),e.content&&e.content.toggleClass(d("content"),t),e.titlebar&&e.titlebar.toggleClass(d("header"),t),e.button&&e.button.toggleClass($+"-icon",!t)},q._storeMouse=function(i){this.mouse={pageX:i.pageX,pageY:i.pageY,type:"mousemove",scrollX:t.pageXOffset||e.body.scrollLeft||e.documentElement.scrollLeft,scrollY:t.pageYOffset||e.body.scrollTop||e.documentElement.scrollTop}},q._bind=function(t,e,i,o){var n="."+this._id+(o||"");e.length&&t.bind((e.split?e:e.join(n+" "))+n,s.proxy(i,this))},q._trigger=function(t,e,i){var o=s.Event("tooltip"+t);return o.originalEvent=i&&s.extend({},i)||this.cache.event||L,this.tooltip.trigger(o,[this].concat(e||[])),!o.isDefaultPrevented()},q._assignEvents=function(){var i=this.options,n=i.position,r=this.tooltip,a=i.show.target,l=i.hide.target,h=n.container,c=n.viewport,d=s(e),m=(s(e.body),s(t)),v=i.show.event?s.trim(""+i.show.event).split(" "):[],y=i.hide.event?s.trim(""+i.hide.event).split(" "):[],b=[];this._bind(r,["mouseenter","mouseleave"],function(t){var e="mouseenter"===t.type;e&&this.focus(t),r.toggleClass(Q,e)}),/mouse(out|leave)/i.test(i.hide.event)&&"window"===i.hide.leave&&this._bind(d,["mouseout","blur"],function(t){/select|option/.test(t.target.nodeName)||t.relatedTarget||this.hide(t)}),i.hide.fixed?(l=l.add(r),this._bind(r,"mouseover",function(){!this.tooltip.hasClass(J)&&clearTimeout(this.timers.hide)})):/mouse(over|enter)/i.test(i.show.event)&&this._bind(l,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+i.hide.event).indexOf("unfocus")>-1&&this._bind(h.closest("html"),["mousedown","touchstart"],function(t){var e=s(t.target),i=this.rendered&&!this.tooltip.hasClass(J)&&this.tooltip[0].offsetWidth>0,o=e.parents(G).filter(this.tooltip[0]).length>0;e[0]===this.target[0]||e[0]===this.tooltip[0]||o||this.target.has(e[0]).length||!i||this.hide(t)}),"number"==typeof i.hide.inactive&&(a.bind("qtip-"+this.id+"-inactive",s.proxy(f,this)),this._bind(l.add(r),T.inactiveEvents,f,"-inactive")),"unfocus"===this.id&&console.log(v,y,b),y=s.map(y,function(t){var e=s.inArray(t,v);return e>-1&&l.add(a).length===l.length?(b.push(v.splice(e,1)[0]),o):t}),this._bind(a,v,p),this._bind(l,y,u),this._bind(a,b,function(t){(this.tooltip[0].offsetWidth>0?u:p).call(this,t)}),"number"==typeof i.hide.distance&&this._bind(a.add(r),"mousemove",function(t){var e=this.cache.origin||{},i=this.options.hide.distance,o=Math.abs;(o(t.pageX-e.pageX)>=i||o(t.pageY-e.pageY)>=i)&&this.hide(t)}),"mouse"===n.target&&(this._bind(a,"mousemove",this._storeMouse),n.adjust.mouse&&(i.hide.event&&(this._bind(r,"mouseleave",function(t){(t.relatedTarget||t.target)!==a[0]&&this.hide(t)}),this._bind(a,["mouseenter","mouseleave"],function(t){this.cache.onTarget="mouseenter"===t.type})),this._bind(d,"mousemove",function(t){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(J)&&this.tooltip[0].offsetWidth>0&&this.reposition(t||this.mouse)}))),(n.adjust.resize||c.length)&&this._bind(s.event.special.resize?c:m,"resize",g),n.adjust.scroll&&this._bind(m.add(n.container),"scroll",g)},q._unassignEvents=function(){var i=[this.options.show.target[0],this.options.hide.target[0],this.rendered&&this.tooltip[0],this.options.position.container[0],this.options.position.viewport[0],this.options.position.container.closest("html")[0],t,e];this.rendered?s([]).pushStack(s.grep(i,function(t){return"object"==typeof t})).unbind("."+this._id):s(i[0]).unbind("."+this._id+"-create")},T=s.fn.qtip=function(t,e,i){var n=(""+t).toLowerCase(),r=L,a=s.makeArray(arguments).slice(1),h=a[a.length-1],c=this[0]?s.data(this[0],$):L;return!arguments.length&&c||"api"===n?c:"string"==typeof t?(this.each(function(){var t=s.data(this,$);if(!t)return k;if(h&&h.timeStamp&&(t.cache.event=h),"option"!==n&&"options"!==n||!e)t[n]&&t[n].apply(t,a);else{if(!s.isPlainObject(e)&&i===o)return r=t.get(e),I;t.set(e,i)}}),r!==L?r:this):"object"!=typeof t&&arguments.length?o:(c=l(s.extend(k,{},t)),T.bind.call(this,c,h))},T.bind=function(t,e){return this.each(function(i){function n(t){function e(){c.render("object"==typeof t||r.show.ready),a.show.add(a.hide).unbind(h)}return c.disabled?I:(c.cache.event=s.extend({},t),c.cache.target=t?s(t.target):[o],r.show.delay>0?(clearTimeout(c.timers.show),c.timers.show=setTimeout(e,r.show.delay),l.show!==l.hide&&a.hide.bind(l.hide,function(){clearTimeout(c.timers.show)})):e(),o)}var r,a,l,h,c,d;return d=s.isArray(t.id)?t.id[i]:t.id,d=!d||d===I||1>d.length||H[d]?T.nextid++:H[d]=d,h=".qtip-"+d+"-create",c=m(s(this),d,t),c===I?k:(r=c.options,s.each(j,function(){"initialize"===this.initialize&&this(c)}),a={show:r.show.target,hide:r.hide.target},l={show:s.trim(""+r.show.event).replace(/ /g,h+" ")+h,hide:s.trim(""+r.hide.event).replace(/ /g,h+" ")+h},/mouse(over|enter)/i.test(l.show)&&!/mouse(out|leave)/i.test(l.hide)&&(l.hide+=" mouseleave"+h),a.show.bind("mousemove"+h,function(t){c._storeMouse(t),c.cache.onTarget=k}),a.show.bind(l.show,n),(r.show.ready||r.prerender)&&n(e),o)})},j=T.plugins={Corner:function(t,e){t=(""+t).replace(/([A-Z])/," $1").replace(/middle/gi,D).toLowerCase(),this.x=(t.match(/left|right/i)||t.match(/center/)||["inherit"])[0].toLowerCase(),this.y=(t.match(/top|bottom|center/i)||["inherit"])[0].toLowerCase(),this._forceY=!!e;var i=t.charAt(0);this.precedance="t"===i||"b"===i?S:W,this.string=function(){return this.precedance===S||this._forceY&&"center"!==this.y?this.y+this.x:this.x+this.y},this.abbrev=function(){var t=this.x.substr(0,1),e=this.y.substr(0,1);return t===e?t:this.precedance===S||this._forceY&&"c"!==e?e+t:t+e},this.invertx=function(t){this.x=this.x===P?F:this.x===F?P:t||this.x},this.inverty=function(t){this.y=this.y===V?A:this.y===A?V:t||this.y},this.clone=function(){return{x:this.x,y:this.y,precedance:this.precedance,string:this.string,abbrev:this.abbrev,clone:this.clone,invertx:this.invertx,inverty:this.inverty}}},offset:function(t,i,o){function n(t,e){i.left+=e*t.scrollLeft(),i.top+=e*t.scrollTop()}if(!o[0])return i;var r,a,l,h,c=s(t[0].ownerDocument),d=!!j.ie&&"CSS1Compat"!==e.compatMode,p=o[0];do"static"!==(a=s.css(p,"position"))&&("fixed"===a?(l=p.getBoundingClientRect(),n(c,-1)):(l=s(p).position(),l.left+=parseFloat(s.css(p,"borderLeftWidth"))||0,l.top+=parseFloat(s.css(p,"borderTopWidth"))||0),i.left-=l.left+(parseFloat(s.css(p,"marginLeft"))||0),i.top-=l.top+(parseFloat(s.css(p,"marginTop"))||0),r||"hidden"===(h=s.css(p,"overflow"))||"visible"===h||(r=p));while(p=p.offsetParent);return(r&&r!==c[0]||d)&&n(r,1),i},ie:function(){for(var t=3,i=e.createElement("div");(i.innerHTML="<!--[if gt IE "+ ++t+"]><i></i><![endif]-->")&&i.getElementsByTagName("i")[0];);return t>4?t:0/0}(),iOS:parseFloat((""+(/CPU.*OS ([0-9_]{1,5})|(CPU like).*AppleWebKit.*Mobile/i.exec(navigator.userAgent)||[0,""])[1]).replace("undefined","3_2").replace("_",".").replace("_",""))||I},s.each({attr:function(t,e){if(this.length){var i=this[0],o="title",n=s.data(i,"qtip");
|
|
if(t===o&&n&&"object"==typeof n&&n.options.suppress)return 2>arguments.length?s.attr(i,Z):(n&&n.options.content.attr===o&&n.cache.attr&&n.set("content.text",e),this.attr(Z,e))}return s.fn["attr"+K].apply(this,arguments)},clone:function(t){var e=(s([]),s.fn["clone"+K].apply(this,arguments));return t||e.filter("["+Z+"]").attr("title",function(){return s.attr(this,Z)}).removeAttr(Z),e}},function(t,e){if(!e||s.fn[t+K])return k;var i=s.fn[t+K]=s.fn[t];s.fn[t]=function(){return e.apply(this,arguments)||i.apply(this,arguments)}}),s.ui||(s["cleanData"+K]=s.cleanData,s.cleanData=function(t){for(var e,i=0;(e=s(t[i])).length&&e.attr(B);i++)try{e.triggerHandler("removeqtip")}catch(o){}s["cleanData"+K](t)}),T.version="2.0.1-70-",T.nextid=0,T.inactiveEvents="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),T.zindex=15e3,T.defaults={prerender:I,id:I,overwrite:k,suppress:k,content:{text:k,attr:"title",title:I,button:I},position:{my:"top left",at:"bottom right",target:I,container:I,viewport:I,adjust:{x:0,y:0,mouse:k,scroll:k,resize:k,method:"flipinvert flipinvert"},effect:function(t,e){s(this).animate(e,{duration:200,queue:I})}},show:{target:I,event:"mouseenter",effect:k,delay:90,solo:I,ready:I,autofocus:I},hide:{target:I,event:"mouseleave",effect:k,delay:0,fixed:I,inactive:I,leave:"window",distance:I},style:{classes:"",widget:I,width:I,height:I,def:k},events:{render:L,move:L,show:L,hide:L,toggle:L,visible:L,hidden:L,focus:L,blur:L}};var ie,oe,se=".qtip-tip",ne="margin",re="border",ae="color",le="background-color",he="transparent",ce=" !important",de=!!e.createElement("canvas").getContext,pe=/rgba?\(0, 0, 0(, 0)?\)|transparent|#123456/i;if(s.curCSS){var ue={},fe=["Webkit","O","Moz","ms"];oe=function(t,e){var i,s,n,r=e.charAt(0).toUpperCase()+e.slice(1),a=(e+" "+fe.join(r+" ")+r).split(" ");if(ue[e])return t.css(ue[e]);for(n in a)if(i=a[n],(s=t.css(i))!==o)return ue[e]=i,s}}else oe=function(t,e){return t.css(e)};de||(createVML=function(t,e,i){return"<qvml:"+t+' xmlns="urn:schemas-microsoft.com:vml" class="qtip-vml" '+(e||"")+' style="behavior: url(#default#VML); '+(i||"")+'" />'}),ie=j.tip=function(t){return new x(t)},ie.initialize="render",ie.sanitize=function(t){var e,i=t.style;i&&"tip"in i&&(e=t.style.tip,"object"!=typeof e&&(t.style.tip={corner:e}),/string|boolean/i.test(typeof e.corner)||(e.corner=k),"number"!=typeof e.width&&delete e.width,"number"!=typeof e.height&&delete e.height,"number"!=typeof e.border&&e.border!==k&&delete e.border,"number"!=typeof e.offset&&delete e.offset)},M.tip={"^position.my|style.tip.(corner|mimic|border)$":function(){!this.init()&&this.destroy(),this.qtip.reposition()},"^style.tip.(height|width)$":function(t){this.size=size=[t.width,t.height],this.create(),this.update(),this.qtip.reposition()},"^content.title|style.(classes|widget)$":function(){var t=this.qtip.elements.tip;t&&t.length&&this.update()}},s.extend(k,T.defaults,{style:{tip:{corner:k,mimic:I,width:6,height:6,border:k,offset:0}}});var ge,me,ve="qtip-modal",ye="."+ve;me=function(){function i(t){if(s.expr[":"].focusable)return s.expr[":"].focusable;var e,i,o,n=!isNaN(s.attr(t,"tabindex")),r=t.nodeName&&t.nodeName.toLowerCase();return"area"===r?(e=t.parentNode,i=e.name,t.href&&i&&"map"===e.nodeName.toLowerCase()?(o=s("img[usemap=#"+i+"]")[0],!!o&&o.is(":visible")):!1):/input|select|textarea|button|object/.test(r)?!t.disabled:"a"===r?t.href||n:n}function o(t){1>d.length&&t.length?t.not("body").blur():d.first().focus()}function n(t){if(h.is(":visible")){var e,i=s(t.target),n=r.tooltip,l=i.closest(G);e=1>l.length?I:parseInt(l[0].style.zIndex,10)>parseInt(n[0].style.zIndex,10),e||i.closest(G)[0]===n[0]||o(i),a=t.target===d[d.length-1]}}var r,a,l,h,c=this,d={};s.extend(c,{init:function(){function i(){var t=s(this);h.css({height:t.height(),width:t.width()})}return h=c.elem=s("<div />",{id:"qtip-overlay",html:"<div></div>",mousedown:function(){return I}}).hide(),s(t).bind("resize"+ye,i),i(),s(e.body).bind("focusin"+ye,n),s(e).bind("keydown"+ye,function(t){r&&r.options.show.modal.escape&&27===t.keyCode&&r.hide(t)}),h.bind("click"+ye,function(t){r&&r.options.show.modal.blur&&r.hide(t)}),c},update:function(t){r=t,d=t.options.show.modal.stealfocus!==I?t.tooltip.find("*").filter(function(){return i(this)}):[]},toggle:function(t,i,n){var a=(s(e.body),t.tooltip),d=t.options.show.modal,p=d.effect,u=i?"show":"hide",f=h.is(":visible"),g=s(ye).filter(":visible:not(:animated)").not(a);return c.update(t),i&&d.stealfocus!==I&&o(s(":focus")),h.toggleClass("blurs",d.blur),i&&h.css({left:0,top:0}).appendTo(e.body),h.is(":animated")&&f===i&&l!==I||!i&&g.length?c:(h.stop(k,I),s.isFunction(p)?p.call(h,i):p===I?h[u]():h.fadeTo(parseInt(n,10)||90,i?1:0,function(){i||h.hide()}),i||h.queue(function(t){h.css({left:"",top:""}),s(ye).length||h.detach(),t()}),l=i,r.destroyed&&(r=L),c)}}),c.init()},me=new me,ge=j.modal=function(t){return new _(t)},ge.sanitize=function(t){t.show&&("object"!=typeof t.show.modal?t.show.modal={on:!!t.show.modal}:t.show.modal.on===o&&(t.show.modal.on=k))},ge.zindex=T.zindex-200,ge.initialize="render",M.modal={"^show.modal.(on|blur)$":function(){this.destroy(),this.init(),this.qtip.elems.overlay.toggle(this.qtip.tooltip[0].offsetWidth>0)}},s.extend(k,T.defaults,{show:{modal:{on:I,effect:k,blur:k,stealfocus:k,escape:k}}}),j.viewport=function(i,o,s,n,r,a,l){function h(t,e,i,s,n,r,a,l,h){var c=o[n],p=g[t],u=m[t],f=i===X,v=-_.offset[n]+x.offset[n]+x["scroll"+n],y=p===n?h:p===r?-h:-h/2,b=u===n?l:u===r?-l:-l/2,w=T&&T.size?T.size[a]||0:0,C=T&&T.corner&&T.corner.precedance===t&&!f?w:0,q=v-c+C,j=c+h-x[a]-v+C,M=y-(g.precedance===t||p===g[e]?b:0)-(u===D?l/2:0);return f?(C=T&&T.corner&&T.corner.precedance===e?w:0,M=(p===n?1:-1)*y-C,o[n]+=q>0?q:j>0?-j:0,o[n]=Math.max(-_.offset[n]+x.offset[n]+(C&&T.corner[t]===D?T.offset:0),c-M,Math.min(Math.max(-_.offset[n]+x.offset[n]+x[a],c+M),o[n]))):(s*=i===N?2:0,q>0&&(p!==n||j>0)?(o[n]-=M+s,d["invert"+t](n)):j>0&&(p!==r||q>0)&&(o[n]-=(p===D?-M:M)+s,d["invert"+t](r)),v>o[n]&&-o[n]>j&&(o[n]=c,d=g.clone())),o[n]-c}var c,d,p,u=s.target,f=i.elements.tooltip,g=s.my,m=s.at,v=s.adjust,y=v.method.split(" "),b=y[0],w=y[1]||y[0],x=s.viewport,_=s.container,C=i.cache,T=i.plugins.tip,q={left:0,top:0};return x.jquery&&u[0]!==t&&u[0]!==e.body&&"none"!==v.method?(c="fixed"===f.css("position"),x={elem:x,width:x[0]===t?x.width():x.outerWidth(I),height:x[0]===t?x.height():x.outerHeight(I),scrollleft:c?0:x.scrollLeft(),scrolltop:c?0:x.scrollTop(),offset:x.offset()||{left:0,top:0}},_={elem:_,scrollLeft:_.scrollLeft(),scrollTop:_.scrollTop(),offset:_.offset()||{left:0,top:0}},("shift"!==b||"shift"!==w)&&(d=g.clone()),q={left:"none"!==b?h(W,S,b,v.x,P,F,O,n,a):0,top:"none"!==w?h(S,W,w,v.y,V,A,E,r,l):0},d&&C.lastClass!==(p=$+"-pos-"+d.abbrev())&&f.removeClass(i.cache.lastClass).addClass(i.cache.lastClass=p),q):q},j.polys={polygon:function(t,e){var i,o,s,n={width:0,height:0,position:{top:1e10,right:0,bottom:0,left:1e10},adjustable:I},r=0,a=[],l=1,h=1,c=0,d=0;for(r=t.length;r--;)i=[parseInt(t[--r],10),parseInt(t[r+1],10)],i[0]>n.position.right&&(n.position.right=i[0]),i[0]<n.position.left&&(n.position.left=i[0]),i[1]>n.position.bottom&&(n.position.bottom=i[1]),i[1]<n.position.top&&(n.position.top=i[1]),a.push(i);if(o=n.width=Math.abs(n.position.right-n.position.left),s=n.height=Math.abs(n.position.bottom-n.position.top),"c"===e.abbrev())n.position={left:n.position.left+n.width/2,top:n.position.top+n.height/2};else{for(;o>0&&s>0&&l>0&&h>0;)for(o=Math.floor(o/2),s=Math.floor(s/2),e.x===P?l=o:e.x===F?l=n.width-o:l+=Math.floor(o/2),e.y===V?h=s:e.y===A?h=n.height-s:h+=Math.floor(s/2),r=a.length;r--&&!(2>a.length);)c=a[r][0]-n.position.left,d=a[r][1]-n.position.top,(e.x===P&&c>=l||e.x===F&&l>=c||e.x===D&&(l>c||c>n.width-l)||e.y===V&&d>=h||e.y===A&&h>=d||e.y===D&&(h>d||d>n.height-h))&&a.splice(r,1);n.position={left:a[0][0],top:a[0][1]}}return n},rect:function(t,e,i,o){return{width:Math.abs(i-t),height:Math.abs(o-e),position:{left:Math.min(t,i),top:Math.min(e,o)}}},_angles:{tc:1.5,tr:7/4,tl:5/4,bc:.5,br:.25,bl:.75,rc:2,lc:1,c:0},ellipse:function(t,e,i,o,s){var n=j.polys._angles[s.abbrev()],r=i*Math.cos(n*Math.PI),a=o*Math.sin(n*Math.PI);return{width:2*i-Math.abs(r),height:2*o-Math.abs(a),position:{left:t+r,top:e+a},adjustable:I}},circle:function(t,e,i,o){return j.polys.ellipse(t,e,i,i,o)}},j.svg=function(t,o,n){for(var r,a,l=s(e),h=o[0],c=I;!h.getBBox;)h=h.parentNode;if(!h.getBBox||!h.parentNode)return I;switch(h.nodeName){case"rect":r=j.svg.toPixel(h,h.x.baseVal.value,h.y.baseVal.value),a=j.svg.toPixel(h,h.x.baseVal.value+h.width.baseVal.value,h.y.baseVal.value+h.height.baseVal.value),c=j.polys.rect(r[0],r[1],a[0],a[1],n);break;case"ellipse":case"circle":r=j.svg.toPixel(h,h.cx.baseVal.value,h.cy.baseVal.value),c=j.polys.ellipse(r[0],r[1],(h.rx||h.r).baseVal.value,(h.ry||h.r).baseVal.value,n);break;case"line":case"polygon":case"polyline":for(points=h.points||[{x:h.x1.baseVal.value,y:h.y1.baseVal.value},{x:h.x2.baseVal.value,y:h.y2.baseVal.value}],c=[],i=-1,len=points.numberOfItems||points.length;len>++i;)next=points.getItem?points.getItem(i):points[i],c.push.apply(c,j.svg.toPixel(h,next.x,next.y));c=j.polys.polygon(c,n);break;default:return I}return c.position.left+=l.scrollLeft(),c.position.top+=l.scrollTop(),c},j.svg.toPixel=function(t,e,i){var o,s,n=t.getScreenCTM(),r=t.farthestViewportElement||t;return r.createSVGPoint?(s=r.createSVGPoint(),s.x=e,s.y=i,o=s.matrixTransform(n),[o.x,o.y]):I},j.imagemap=function(t,e,i){e.jquery||(e=s(e));var o,n,r,a=e.attr("shape").toLowerCase().replace("poly","polygon"),l=s('img[usemap="#'+e.parent("map").attr("name")+'"]'),h=e.attr("coords"),c=h.split(",");if(!l.length)return I;if("polygon"===a)result=j.polys.polygon(c,i);else{if(!j.polys[a])return I;for(r=-1,len=c.length,n=[];len>++r;)n.push(parseInt(c[r],10));result=j.polys[a].apply(this,n.concat(i))}return o=l.offset(),o.left+=Math.ceil((l.outerWidth(I)-l.width())/2),o.top+=Math.ceil((l.outerHeight(I)-l.height())/2),result.position.left+=o.left,result.position.top+=o.top,result};var be;be=j.ie6=function(t){return 6===j.ie?new C(t):I},be.initialize="render",M.ie6={"^content|style$":function(){this.redraw()}}})})(window,document);
|
|
|
|
(function(c,q){var m="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";c.fn.imagesLoaded=function(f){function n(){var b=c(j),a=c(h);d&&(h.length?d.reject(e,b,a):d.resolve(e));c.isFunction(f)&&f.call(g,e,b,a)}function p(b){k(b.target,"error"===b.type)}function k(b,a){b.src===m||-1!==c.inArray(b,l)||(l.push(b),a?h.push(b):j.push(b),c.data(b,"imagesLoaded",{isBroken:a,src:b.src}),r&&d.notifyWith(c(b),[a,e,c(j),c(h)]),e.length===l.length&&(setTimeout(n),e.unbind(".imagesLoaded",
|
|
p)))}var g=this,d=c.isFunction(c.Deferred)?c.Deferred():0,r=c.isFunction(d.notify),e=g.find("img").add(g.filter("img")),l=[],j=[],h=[];c.isPlainObject(f)&&c.each(f,function(b,a){if("callback"===b)f=a;else if(d)d[b](a)});e.length?e.bind("load.imagesLoaded error.imagesLoaded",p).each(function(b,a){var d=a.src,e=c.data(a,"imagesLoaded");if(e&&e.src===d)k(a,e.isBroken);else if(a.complete&&a.naturalWidth!==q)k(a,0===a.naturalWidth||0===a.naturalHeight);else if(a.readyState||a.complete)a.src=m,a.src=d}):
|
|
n();return d?d.promise(g):g}})(jQuery);
|