You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
27 KiB
JavaScript
2 lines
27 KiB
JavaScript
/* qTip2 v2.1.1 ie6 | qtip2.com | Licensed MIT, GPL | Mon Sep 23 2013 16:28:19 */
|
|
!function(a,b,c){!function(a){"use strict";"function"==typeof define&&define.amd?define(["jquery","imagesloaded"],a):jQuery&&!jQuery.fn.qtip&&a(jQuery)}(function(d){function e(a,b,c,e){this.id=c,this.target=a,this.tooltip=z,this.elements=elements={target:a},this._id=K+"-"+c,this.timers={img:{}},this.options=b,this.plugins={},this.cache=cache={event:{},target:d(),disabled:y,attr:e,onTooltip:y,lastClass:""},this.rendered=this.destroyed=this.disabled=this.waiting=this.hiddenDuringWait=this.positioning=this.triggering=y}function f(a){return a===z||"object"!==d.type(a)}function g(a){return!(d.isFunction(a)||a&&a.attr||a.length||"object"===d.type(a)&&(a.jquery||a.then))}function h(a){var b,c,e,h;return f(a)?y:(f(a.metadata)&&(a.metadata={type:a.metadata}),"content"in a&&(b=a.content,f(b)||b.jquery||b.done?b=a.content={text:c=g(b)?y:b}:c=b.text,"ajax"in b&&(e=b.ajax,h=e&&e.once!==y,delete b.ajax,b.text=function(a,b){var f=c||d(this).attr(b.options.content.attr)||"Loading...",g=d.ajax(d.extend({},e,{context:b})).then(e.success,z,e.error).then(function(a){return a&&h&&b.set("content.text",a),a},function(a,c,d){b.destroyed||0===a.status||b.set("content.text",c+": "+d)});return h?f:(b.set("content.text",f),g)}),"title"in b&&(f(b.title)||(b.button=b.title.button,b.title=b.title.text),g(b.title||y)&&(b.title=y))),"position"in a&&f(a.position)&&(a.position={my:a.position,at:a.position}),"show"in a&&f(a.show)&&(a.show=a.show.jquery?{target:a.show}:a.show===x?{ready:x}:{event:a.show}),"hide"in a&&f(a.hide)&&(a.hide=a.hide.jquery?{target:a.hide}:{event:a.hide}),"style"in a&&f(a.style)&&(a.style={classes:a.style}),d.each(J,function(){this.sanitize&&this.sanitize(a)}),a)}function i(a,b){for(var c,d=0,e=a,f=b.split(".");e=e[f[d++]];)d<f.length&&(c=e);return[c||a,f.pop()]}function j(a,b){var c,d,e;for(c in this.checks)for(d in this.checks[c])(e=new RegExp(d,"i").exec(a))&&(b.push(e),("builtin"===c||this.plugins[c])&&this.checks[c][d].apply(this.plugins[c]||this,b))}function k(a){return N.concat("").join(a?"-"+a+" ":" ")}function l(a){if(this.tooltip.hasClass(U))return y;clearTimeout(this.timers.show),clearTimeout(this.timers.hide);var b=d.proxy(function(){this.toggle(x,a)},this);this.options.show.delay>0?this.timers.show=setTimeout(b,this.options.show.delay):b()}function m(a){if(this.tooltip.hasClass(U))return y;var b=d(a.relatedTarget),c=b.closest(O)[0]===this.tooltip[0],e=b[0]===this.options.show.target[0];if(clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this!==b[0]&&"mouse"===this.options.position.target&&c||this.options.hide.fixed&&/mouse(out|leave|move)/.test(a.type)&&(c||e))try{a.preventDefault(),a.stopImmediatePropagation()}catch(f){}else{var g=d.proxy(function(){this.toggle(y,a)},this);this.options.hide.delay>0?this.timers.hide=setTimeout(g,this.options.hide.delay):g()}}function n(a){return this.tooltip.hasClass(U)||!this.options.hide.inactive?y:(clearTimeout(this.timers.inactive),this.timers.inactive=setTimeout(d.proxy(function(){this.hide(a)},this),this.options.hide.inactive),void 0)}function o(a){this.rendered&&this.tooltip[0].offsetWidth>0&&this.reposition(a)}function p(a,c,e){d(b.body).delegate(a,(c.split?c:c.join($+" "))+$,function(){var a=s.api[d.attr(this,M)];a&&!a.disabled&&e.apply(a,arguments)})}function q(a,c,f){var g,i,j,k,l,m=d(b.body),n=a[0]===b?m:a,o=a.metadata?a.metadata(f.metadata):z,p="html5"===f.metadata.type&&o?o[f.metadata.name]:z,q=a.data(f.metadata.name||"qtipopts");try{q="string"==typeof q?d.parseJSON(q):q}catch(r){}if(k=d.extend(x,{},s.defaults,f,"object"==typeof q?h(q):z,h(p||o)),i=k.position,k.id=c,"boolean"==typeof k.content.text){if(j=a.attr(k.content.attr),k.content.attr===y||!j)return y;k.content.text=j}if(i.container.length||(i.container=m),i.target===y&&(i.target=n),k.show.target===y&&(k.show.target=n),k.show.solo===x&&(k.show.solo=i.container.closest("body")),k.hide.target===y&&(k.hide.target=n),k.position.viewport===x&&(k.position.viewport=i.container),i.container=i.container.eq(0),i.at=new u(i.at,x),i.my=new u(i.my),a.data(K))if(k.overwrite)a.qtip("destroy");else if(k.overwrite===y)return y;return a.attr(L,c),k.suppress&&(l=a.attr("title"))&&a.removeAttr("title").attr(W,l).attr("title",""),g=new e(a,k,c,!!j),a.data(K,g),a.one("remove.qtip-"+c+" removeqtip.qtip-"+c,function(){var a;(a=d(this).data(K))&&a.destroy()}),g}function r(a){this._ns="ie6",this.init(this.qtip=a)}var s,t,u,v,w,x=!0,y=!1,z=null,A="x",B="y",C="width",D="height",E="top",F="left",G="bottom",H="right",I="center",J={},K="qtip",L="data-hasqtip",M="data-qtip-id",N=["ui-widget","ui-tooltip"],O="."+K,P="click dblclick mousedown mouseup mousemove mouseleave mouseenter".split(" "),Q=K+"-fixed",R=K+"-default",S=K+"-focus",T=K+"-hover",U=K+"-disabled",V="_replacedByqTip",W="oldtitle";BROWSER={ie:function(){for(var a=3,c=b.createElement("div");(c.innerHTML="<!--[if gt IE "+ ++a+"]><i></i><![endif]-->")&&c.getElementsByTagName("i")[0];);return a>4?a: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("_",""))||y},t=e.prototype,t.render=function(a){if(this.rendered||this.destroyed)return this;var b=this,c=this.options,e=this.cache,f=this.elements,g=c.content.text,h=c.content.title,i=c.content.button,j=c.position,k="."+this._id+" ",l=[];return d.attr(this.target[0],"aria-describedby",this._id),this.tooltip=f.tooltip=tooltip=d("<div/>",{id:this._id,"class":[K,R,c.style.classes,K+"-pos-"+c.position.my.abbrev()].join(" "),width:c.style.width||"",height:c.style.height||"",tracking:"mouse"===j.target&&j.adjust.mouse,role:"alert","aria-live":"polite","aria-atomic":y,"aria-describedby":this._id+"-content","aria-hidden":x}).toggleClass(U,this.disabled).attr(M,this.id).data(K,this).appendTo(j.container).append(f.content=d("<div />",{"class":K+"-content",id:this._id+"-content","aria-atomic":x})),this.rendered=-1,this.positioning=x,h&&(this._createTitle(),d.isFunction(h)||l.push(this._updateTitle(h,y))),i&&this._createButton(),d.isFunction(g)||l.push(this._updateContent(g,y)),this.rendered=x,this._setWidget(),d.each(c.events,function(a,b){d.isFunction(b)&&tooltip.bind(("toggle"===a?["tooltipshow","tooltiphide"]:["tooltip"+a]).join(k)+k,b)}),d.each(J,function(a){var c;"render"===this.initialize&&(c=this(b))&&(b.plugins[a]=c)}),this._assignEvents(),d.when.apply(d,l).then(function(){b._trigger("render"),b.positioning=y,b.hiddenDuringWait||!c.show.ready&&!a||b.toggle(x,e.event,y),b.hiddenDuringWait=y}),s.api[this.id]=this,this},t.destroy=function(a){function b(){if(!this.destroyed){this.destroyed=x;var a=this.target,b=a.attr(W);this.rendered&&this.tooltip.stop(1,0).find("*").remove().end().remove(),d.each(this.plugins,function(){this.destroy&&this.destroy()}),clearTimeout(this.timers.show),clearTimeout(this.timers.hide),this._unassignEvents(),a.removeData(K).removeAttr(M).removeAttr("aria-describedby"),this.options.suppress&&b&&a.attr("title",b).removeAttr(W),this._unbind(a),this.options=this.elements=this.cache=this.timers=this.plugins=this.mouse=z,delete s.api[this.id]}}return this.destroyed?this.target:(a!==x&&this.rendered?(tooltip.one("tooltiphidden",d.proxy(b,this)),!this.triggering&&this.hide()):b.call(this),this.target)},v=t.checks={builtin:{"^id$":function(a,b,c,e){var f=c===x?s.nextid:c,g=K+"-"+f;f!==y&&f.length>0&&!d("#"+g).length?(this._id=g,this.rendered&&(this.tooltip[0].id=this._id,this.elements.content[0].id=this._id+"-content",this.elements.title[0].id=this._id+"-title")):a[b]=e},"^prerender":function(a,b,c){c&&!this.rendered&&this.render(this.options.show.ready)},"^content.text$":function(a,b,c){this._updateContent(c)},"^content.attr$":function(a,b,c,d){this.options.content.text===this.target.attr(d)&&this._updateContent(this.target.attr(c))},"^content.title$":function(a,b,c){return c?(c&&!this.elements.title&&this._createTitle(),this._updateTitle(c),void 0):this._removeTitle()},"^content.button$":function(a,b,c){this._updateButton(c)},"^content.title.(text|button)$":function(a,b,c){this.set("content."+b,c)},"^position.(my|at)$":function(a,b,c){"string"==typeof c&&(a[b]=new u(c,"at"===b))},"^position.container$":function(a,b,c){this.tooltip.appendTo(c)},"^show.ready$":function(a,b,c){c&&(!this.rendered&&this.render(x)||this.toggle(x))},"^style.classes$":function(a,b,c,d){this.tooltip.removeClass(d).addClass(c)},"^style.width|height":function(a,b,c){this.tooltip.css(b,c)},"^style.widget|content.title":function(){this._setWidget()},"^style.def":function(a,b,c){this.tooltip.toggleClass(R,!!c)},"^events.(render|show|move|hide|focus|blur)$":function(a,b,c){tooltip[(d.isFunction(c)?"":"un")+"bind"]("tooltip"+b,c)},"^(show|hide|position).(event|target|fixed|inactive|leave|distance|viewport|adjust)":function(){var a=this.options.position;tooltip.attr("tracking","mouse"===a.target&&a.adjust.mouse),this._unassignEvents(),this._assignEvents()}}},t.get=function(a){if(this.destroyed)return this;var b=i(this.options,a.toLowerCase()),c=b[0][b[1]];return c.precedance?c.string():c};var X=/^position\.(my|at|adjust|target|container|viewport)|style|content|show\.ready/i,Y=/^prerender|show\.ready/i;t.set=function(a,b){if(this.destroyed)return this;var c,e=this.rendered,f=y,g=this.options;return this.checks,"string"==typeof a?(c=a,a={},a[c]=b):a=d.extend({},a),d.each(a,function(b,c){if(!e&&!Y.test(b))return delete a[b],void 0;var h,j=i(g,b.toLowerCase());h=j[0][j[1]],j[0][j[1]]=c&&c.nodeType?d(c):c,f=X.test(b)||f,a[b]=[j[0],j[1],c,h]}),h(g),this.positioning=x,d.each(a,d.proxy(j,this)),this.positioning=y,this.rendered&&this.tooltip[0].offsetWidth>0&&f&&this.reposition("mouse"===g.position.target?z:this.cache.event),this},t._update=function(a,b){var c=this,e=this.cache;return this.rendered&&a?(d.isFunction(a)&&(a=a.call(this.elements.target,e.event,this)||""),d.isFunction(a.then)?(e.waiting=x,a.then(function(a){return e.waiting=y,c._update(a,b)},z,function(a){return c._update(a,b)})):a===y||!a&&""!==a?y:(a.jquery&&a.length>0?b.children().detach().end().append(a.css({display:"block"})):b.html(a),e.waiting=x,(d.fn.imagesLoaded?b.imagesLoaded():d.Deferred().resolve(d([]))).done(function(a){e.waiting=y,a.length&&c.rendered&&c.tooltip[0].offsetWidth>0&&c.reposition(e.event,!a.length)}).promise())):y},t._updateContent=function(a,b){this._update(a,this.elements.content,b)},t._updateTitle=function(a,b){this._update(a,this.elements.title,b)===y&&this._removeTitle(y)},t._createTitle=function(){var a=this.elements,b=this._id+"-title";a.titlebar&&this._removeTitle(),a.titlebar=d("<div />",{"class":K+"-titlebar "+(this.options.style.widget?k("header"):"")}).append(a.title=d("<div />",{id:b,"class":K+"-title","aria-atomic":x})).insertBefore(a.content).delegate(".qtip-close","mousedown keydown mouseup keyup mouseout",function(a){d(this).toggleClass("ui-state-active ui-state-focus","down"===a.type.substr(-4))}).delegate(".qtip-close","mouseover mouseout",function(a){d(this).toggleClass("ui-state-hover","mouseover"===a.type)}),this.options.content.button&&this._createButton()},t._removeTitle=function(a){var b=this.elements;b.title&&(b.titlebar.remove(),b.titlebar=b.title=b.button=z,a!==y&&this.reposition())},t.reposition=function(c,e){if(!this.rendered||this.positioning||this.destroyed)return this;this.positioning=x;var f,g,h=this.cache,i=this.tooltip,j=this.options.position,k=j.target,l=j.my,m=j.at,n=j.viewport,o=j.container,p=j.adjust,q=p.method.split(" "),r=i.outerWidth(y),s=i.outerHeight(y),t=0,u=0,v=i.css("position"),w={left:0,top:0},z=i[0].offsetWidth>0,A=c&&"scroll"===c.type,B=d(a),C=o[0].ownerDocument,D=this.mouse;if(d.isArray(k)&&2===k.length)m={x:F,y:E},w={left:k[0],top:k[1]};else if("mouse"===k&&(c&&c.pageX||h.event.pageX))m={x:F,y:E},c=!D||!D.pageX||!p.mouse&&c&&c.pageX?(!c||"resize"!==c.type&&"scroll"!==c.type?c&&c.pageX&&"mousemove"===c.type?c:(!p.mouse||this.options.show.distance)&&h.origin&&h.origin.pageX?h.origin:c:h.event)||c||h.event||D||{}:D,"static"!==v&&(w=o.offset()),C.body.offsetWidth!==(a.innerWidth||C.documentElement.clientWidth)&&(g=d(C.body).offset()),w={left:c.pageX-w.left+(g&&g.left||0),top:c.pageY-w.top+(g&&g.top||0)},p.mouse&&A&&(w.left-=D.scrollX-B.scrollLeft(),w.top-=D.scrollY-B.scrollTop());else{if("event"===k&&c&&c.target&&"scroll"!==c.type&&"resize"!==c.type?h.target=d(c.target):"event"!==k&&(h.target=d(k.jquery?k:elements.target)),k=h.target,k=d(k).eq(0),0===k.length)return this;k[0]===b||k[0]===a?(t=BROWSER.iOS?a.innerWidth:k.width(),u=BROWSER.iOS?a.innerHeight:k.height(),k[0]===a&&(w={top:(n||k).scrollTop(),left:(n||k).scrollLeft()})):J.imagemap&&k.is("area")?f=J.imagemap(this,k,m,J.viewport?q:y):J.svg&&k[0].ownerSVGElement?f=J.svg(this,k,m,J.viewport?q:y):(t=k.outerWidth(y),u=k.outerHeight(y),w=k.offset()),f&&(t=f.width,u=f.height,g=f.offset,w=f.position),w=this.reposition.offset(k,w,o),(BROWSER.iOS>3.1&&BROWSER.iOS<4.1||BROWSER.iOS>=4.3&&BROWSER.iOS<4.33||!BROWSER.iOS&&"fixed"===v)&&(w.left-=B.scrollLeft(),w.top-=B.scrollTop()),(!f||f&&f.adjustable!==y)&&(w.left+=m.x===H?t:m.x===I?t/2:0,w.top+=m.y===G?u:m.y===I?u/2:0)}return w.left+=p.x+(l.x===H?-r:l.x===I?-r/2:0),w.top+=p.y+(l.y===G?-s:l.y===I?-s/2:0),J.viewport?(w.adjusted=J.viewport(this,w,j,t,u,r,s),g&&w.adjusted.left&&(w.left+=g.left),g&&w.adjusted.top&&(w.top+=g.top)):w.adjusted={left:0,top:0},this._trigger("move",[w,n.elem||n],c)?(delete w.adjusted,e===y||!z||isNaN(w.left)||isNaN(w.top)||"mouse"===k||!d.isFunction(j.effect)?i.css(w):d.isFunction(j.effect)&&(j.effect.call(i,this,d.extend({},w)),i.queue(function(a){d(this).css({opacity:"",height:""}),BROWSER.ie&&this.style.removeAttribute("filter"),a()})),this.positioning=y,this):this},t.reposition.offset=function(a,c,e){function f(a,b){c.left+=b*a.scrollLeft(),c.top+=b*a.scrollTop()}if(!e[0])return c;var g,h,i,j,k=d(a[0].ownerDocument),l=!!BROWSER.ie&&"CSS1Compat"!==b.compatMode,m=e[0];do"static"!==(h=d.css(m,"position"))&&("fixed"===h?(i=m.getBoundingClientRect(),f(k,-1)):(i=d(m).position(),i.left+=parseFloat(d.css(m,"borderLeftWidth"))||0,i.top+=parseFloat(d.css(m,"borderTopWidth"))||0),c.left-=i.left+(parseFloat(d.css(m,"marginLeft"))||0),c.top-=i.top+(parseFloat(d.css(m,"marginTop"))||0),g||"hidden"===(j=d.css(m,"overflow"))||"visible"===j||(g=d(m)));while(m=m.offsetParent);return g&&(g[0]!==k[0]||l)&&f(g,1),c};var Z=(u=t.reposition.Corner=function(a,b){a=(""+a).replace(/([A-Z])/," $1").replace(/middle/gi,I).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(),this.forceY=!!b;var c=a.charAt(0);this.precedance="t"===c||"b"===c?B:A}).prototype;Z.invert=function(a,b){this[a]=this[a]===F?H:this[a]===H?F:b||this[a]},Z.string=function(){var a=this.x,b=this.y;return a===b?a:this.precedance===B||this.forceY&&"center"!==b?b+" "+a:a+" "+b},Z.abbrev=function(){var a=this.string().split(" ");return a[0].charAt(0)+(a[1]&&a[1].charAt(0)||"")},Z.clone=function(){return new u(this.string(),this.forceY)},t.toggle=function(a,c){var e=this.cache,f=this.options,g=this.tooltip;if(c){if(/over|enter/.test(c.type)&&/out|leave/.test(e.event.type)&&f.show.target.add(c.target).length===f.show.target.length&&g.has(c.relatedTarget).length)return this;e.event=d.extend({},c)}if(this.waiting&&!a&&(this.hiddenDuringWait=x),!this.rendered)return a?this.render(1):this;if(this.destroyed||this.disabled)return this;var h,i,j=a?"show":"hide",k=this.options[j],l=(this.options[a?"hide":"show"],this.options.position),m=this.options.content,n=this.tooltip.css("width"),o=this.tooltip[0].offsetWidth>0,p=a||1===k.target.length,q=!c||k.target.length<2||e.target[0]===c.target;return(typeof a).search("boolean|number")&&(a=!o),h=!g.is(":animated")&&o===a&&q,i=h?z:!!this._trigger(j,[90]),i!==y&&a&&this.focus(c),!i||h?this:(d.attr(g[0],"aria-hidden",!a),a?(e.origin=d.extend({},this.mouse),d.isFunction(m.text)&&this._updateContent(m.text,y),d.isFunction(m.title)&&this._updateTitle(m.title,y),!w&&"mouse"===l.target&&l.adjust.mouse&&(d(b).bind("mousemove."+K,this._storeMouse),w=x),n||g.css("width",g.outerWidth(y)),this.reposition(c,arguments[2]),n||g.css("width",""),k.solo&&("string"==typeof k.solo?d(k.solo):d(O,k.solo)).not(g).not(k.target).qtip("hide",d.Event("tooltipsolo"))):(clearTimeout(this.timers.show),delete e.origin,w&&!d(O+'[tracking="true"]:visible',k.solo).not(g).length&&(d(b).unbind("mousemove."+K),w=y),this.blur(c)),after=d.proxy(function(){a?(BROWSER.ie&&g[0].style.removeAttribute("filter"),g.css("overflow",""),"string"==typeof k.autofocus&&d(this.options.show.autofocus,g).focus(),this.options.show.target.trigger("qtip-"+this.id+"-inactive")):g.css({display:"",visibility:"",opacity:"",left:"",top:""}),this._trigger(a?"visible":"hidden")},this),k.effect===y||p===y?(g[j](),after()):d.isFunction(k.effect)?(g.stop(1,1),k.effect.call(g,this),g.queue("fx",function(a){after(),a()})):g.fadeTo(90,a?1:0,after),a&&k.target.trigger("qtip-"+this.id+"-inactive"),this)},t.show=function(a){return this.toggle(x,a)},t.hide=function(a){return this.toggle(y,a)},t.focus=function(a){if(!this.rendered||this.destroyed)return this;var b=d(O),c=this.tooltip,e=parseInt(c[0].style.zIndex,10),f=s.zindex+b.length;return c.hasClass(S)||this._trigger("focus",[f],a)&&(e!==f&&(b.each(function(){this.style.zIndex>e&&(this.style.zIndex=this.style.zIndex-1)}),b.filter("."+S).qtip("blur",a)),c.addClass(S)[0].style.zIndex=f),this},t.blur=function(a){return!this.rendered||this.destroyed?this:(this.tooltip.removeClass(S),this._trigger("blur",[this.tooltip.css("zIndex")],a),this)},t.disable=function(a){return this.destroyed?this:("boolean"!=typeof a&&(a=!(this.tooltip.hasClass(U)||this.disabled)),this.rendered&&this.tooltip.toggleClass(U,a).attr("aria-disabled",a),this.disabled=!!a,this)},t.enable=function(){return this.disable(y)},t._createButton=function(){var a=this,b=this.elements,c=b.tooltip,e=this.options.content.button,f="string"==typeof e,g=f?e:"Close tooltip";b.button&&b.button.remove(),b.button=e.jquery?e:d("<a />",{"class":"qtip-close "+(this.options.style.widget?"":K+"-icon"),title:g,"aria-label":g}).prepend(d("<span />",{"class":"ui-icon ui-icon-close",html:"×"})),b.button.appendTo(b.titlebar||c).attr("role","button").click(function(b){return c.hasClass(U)||a.hide(b),y})},t._updateButton=function(a){if(!this.rendered)return y;var b=this.elements.button;a?this._createButton():b.remove()},t._setWidget=function(){var a=this.options.style.widget,b=this.elements,c=b.tooltip,d=c.hasClass(U);c.removeClass(U),U=a?"ui-state-disabled":"qtip-disabled",c.toggleClass(U,d),c.toggleClass("ui-helper-reset "+k(),a).toggleClass(R,this.options.style.def&&!a),b.content&&b.content.toggleClass(k("content"),a),b.titlebar&&b.titlebar.toggleClass(k("header"),a),b.button&&b.button.toggleClass(K+"-icon",!a)},t._storeMouse=function(c){this.mouse={pageX:c.pageX,pageY:c.pageY,type:"mousemove",scrollX:a.pageXOffset||b.body.scrollLeft||b.documentElement.scrollLeft,scrollY:a.pageYOffset||b.body.scrollTop||b.documentElement.scrollTop}},t._bind=function(a,b,c,e,f){var g="."+this._id+(e?"-"+e:"");b.length&&d(a).bind((b.split?b:b.join(g+" "))+g,d.proxy(c,f||this))},t._unbind=function(a,b){d(a).unbind("."+this._id+(b?"-"+b:""))};var $="."+K;d(function(){p(O,["mouseenter","mouseleave"],function(a){var b="mouseenter"===a.type,c=d(a.currentTarget),e=d(a.relatedTarget||a.target),f=this.options;b?(this.focus(a),c.hasClass(Q)&&!c.hasClass(U)&&clearTimeout(this.timers.hide)):"mouse"===f.position.target&&f.hide.event&&f.show.target&&!e.closest(f.show.target[0]).length&&this.hide(a),c.toggleClass(T,b)}),p("["+M+"]",P,n)}),t._trigger=function(a,b,c){var e=d.Event("tooltip"+a);return e.originalEvent=c&&d.extend({},c)||this.cache.event||z,this.triggering=x,this.tooltip.trigger(e,[this].concat(b||[])),this.triggering=y,!e.isDefaultPrevented()},t._assignEvents=function(){var c=this.options,e=c.position,f=this.tooltip,g=c.show.target,h=c.hide.target,i=e.container,j=e.viewport,k=d(b),p=(d(b.body),d(a)),q=c.show.event?d.trim(""+c.show.event).split(" "):[],r=c.hide.event?d.trim(""+c.hide.event).split(" "):[],t=[];/mouse(out|leave)/i.test(c.hide.event)&&"window"===c.hide.leave&&this._bind(k,["mouseout","blur"],function(a){/select|option/.test(a.target.nodeName)||a.relatedTarget||this.hide(a)}),c.hide.fixed?h=h.add(f.addClass(Q)):/mouse(over|enter)/i.test(c.show.event)&&this._bind(h,"mouseleave",function(){clearTimeout(this.timers.show)}),(""+c.hide.event).indexOf("unfocus")>-1&&this._bind(i.closest("html"),["mousedown","touchstart"],function(a){var b=d(a.target),c=this.rendered&&!this.tooltip.hasClass(U)&&this.tooltip[0].offsetWidth>0,e=b.parents(O).filter(this.tooltip[0]).length>0;b[0]===this.target[0]||b[0]===this.tooltip[0]||e||this.target.has(b[0]).length||!c||this.hide(a)}),"number"==typeof c.hide.inactive&&(this._bind(g,"qtip-"+this.id+"-inactive",n),this._bind(h.add(f),s.inactiveEvents,n,"-inactive")),r=d.map(r,function(a){var b=d.inArray(a,q);return b>-1&&h.add(g).length===h.length?(t.push(q.splice(b,1)[0]),void 0):a}),this._bind(g,q,l),this._bind(h,r,m),this._bind(g,t,function(a){(this.tooltip[0].offsetWidth>0?m:l).call(this,a)}),this._bind(g.add(f),"mousemove",function(a){if("number"==typeof c.hide.distance){var b=this.cache.origin||{},d=this.options.hide.distance,e=Math.abs;(e(a.pageX-b.pageX)>=d||e(a.pageY-b.pageY)>=d)&&this.hide(a)}this._storeMouse(a)}),"mouse"===e.target&&e.adjust.mouse&&(c.hide.event&&this._bind(g,["mouseenter","mouseleave"],function(a){this.cache.onTarget="mouseenter"===a.type}),this._bind(k,"mousemove",function(a){this.rendered&&this.cache.onTarget&&!this.tooltip.hasClass(U)&&this.tooltip[0].offsetWidth>0&&this.reposition(a)})),(e.adjust.resize||j.length)&&this._bind(d.event.special.resize?j:p,"resize",o),e.adjust.scroll&&this._bind(p.add(e.container),"scroll",o)},t._unassignEvents=function(){var c=[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],a,b];this.rendered?this._unbind(d([]).pushStack(d.grep(c,function(a){return"object"==typeof a}))):d(c[0]).unbind("."+this._id+"-create")},s=d.fn.qtip=function(a,b,e){var f=(""+a).toLowerCase(),g=z,i=d.makeArray(arguments).slice(1),j=i[i.length-1],k=this[0]?d.data(this[0],K):z;return!arguments.length&&k||"api"===f?k:"string"==typeof a?(this.each(function(){var a=d.data(this,K);if(!a)return x;if(j&&j.timeStamp&&(a.cache.event=j),!b||"option"!==f&&"options"!==f)a[f]&&a[f].apply(a,i);else{if(e===c&&!d.isPlainObject(b))return g=a.get(b),y;a.set(b,e)}}),g!==z?g:this):"object"!=typeof a&&arguments.length?void 0:(k=h(d.extend(x,{},a)),s.bind.call(this,k,j))},s.bind=function(a,b){return this.each(function(e){function f(a){function b(){k.render("object"==typeof a||g.show.ready),h.show.add(h.hide).unbind(j)}return k.disabled?y:(k.cache.event=d.extend({},a),k.cache.target=a?d(a.target):[c],g.show.delay>0?(clearTimeout(k.timers.show),k.timers.show=setTimeout(b,g.show.delay),i.show!==i.hide&&h.hide.bind(i.hide,function(){clearTimeout(k.timers.show)})):b(),void 0)}var g,h,i,j,k,l;return l=d.isArray(a.id)?a.id[e]:a.id,l=!l||l===y||l.length<1||s.api[l]?s.nextid++:l,j=".qtip-"+l+"-create",k=q(d(this),l,a),k===y?x:(s.api[l]=k,g=k.options,d.each(J,function(){"initialize"===this.initialize&&this(k)}),h={show:g.show.target,hide:g.hide.target},i={show:d.trim(""+g.show.event).replace(/ /g,j+" ")+j,hide:d.trim(""+g.hide.event).replace(/ /g,j+" ")+j},/mouse(over|enter)/i.test(i.show)&&!/mouse(out|leave)/i.test(i.hide)&&(i.hide+=" mouseleave"+j),h.show.bind("mousemove"+j,function(a){k._storeMouse(a),k.cache.onTarget=x}),h.show.bind(i.show,f),(g.show.ready||g.prerender)&&f(b),void 0)})},s.api={},d.each({attr:function(a,b){if(this.length){var c=this[0],e="title",f=d.data(c,"qtip");if(a===e&&f&&"object"==typeof f&&f.options.suppress)return arguments.length<2?d.attr(c,W):(f&&f.options.content.attr===e&&f.cache.attr&&f.set("content.text",b),this.attr(W,b))}return d.fn["attr"+V].apply(this,arguments)},clone:function(a){var b=(d([]),d.fn["clone"+V].apply(this,arguments));return a||b.filter("["+W+"]").attr("title",function(){return d.attr(this,W)}).removeAttr(W),b}},function(a,b){if(!b||d.fn[a+V])return x;var c=d.fn[a+V]=d.fn[a];d.fn[a]=function(){return b.apply(this,arguments)||c.apply(this,arguments)}}),d.ui||(d["cleanData"+V]=d.cleanData,d.cleanData=function(a){for(var b,c=0;(b=d(a[c])).length;c++)if(b.attr(L))try{b.triggerHandler("removeqtip")}catch(e){}d["cleanData"+V].apply(this,arguments)}),s.version="2.1.1",s.nextid=0,s.inactiveEvents=P,s.zindex=15e3,s.defaults={prerender:y,id:y,overwrite:x,suppress:x,content:{text:x,attr:"title",title:y,button:y},position:{my:"top left",at:"bottom right",target:y,container:y,viewport:y,adjust:{x:0,y:0,mouse:x,scroll:x,resize:x,method:"flipinvert flipinvert"},effect:function(a,b){d(this).animate(b,{duration:200,queue:y})}},show:{target:y,event:"mouseenter",effect:x,delay:90,solo:y,ready:y,autofocus:y},hide:{target:y,event:"mouseleave",effect:x,delay:0,fixed:y,inactive:y,leave:"window",distance:y},style:{classes:"",widget:y,width:y,height:y,def:x},events:{render:z,move:z,show:z,hide:z,toggle:z,visible:z,hidden:z,focus:z,blur:z}};var _,ab='<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>';d.extend(r.prototype,{_scroll:function(){var b=this.qtip.elements.overlay;b&&(b[0].style.top=d(a).scrollTop()+"px")},init:function(c){var e=c.tooltip;d("select, object").length<1&&(this.bgiframe=c.elements.bgiframe=d(ab).appendTo(e),c._bind(e,"tooltipmove",this.adjustBGIFrame,this._ns,this)),this.redrawContainer=d("<div/>",{id:K+"-rcontainer"}).appendTo(b.body),c.elements.overlay&&c.elements.overlay.addClass("qtipmodal-ie6fix")&&(c._bind(a,["scroll","resize"],this._scroll,this._ns,this),c._bind(e,["tooltipshow"],this._scroll,this._ns,this)),this.redraw()},adjustBGIFrame:function(){var a,b,c=this.qtip.tooltip,d={height:c.outerHeight(y),width:c.outerWidth(y)},e=this.qtip.plugins.tip,f=this.qtip.elements.tip;b=parseInt(c.css("borderLeftWidth"),10)||0,b={left:-b,top:-b},e&&f&&(a="x"===e.corner.precedance?[C,F]:[D,E],b[a[1]]-=f[a[0]]()),this.bgiframe.css(b).css(d)},redraw:function(){if(this.qtip.rendered<1||this.drawing)return self;var a,b,c,d,e=this.qtip.tooltip,f=this.qtip.options.style,g=this.qtip.options.position.container;return this.qtip.drawing=1,f.height&&e.css(D,f.height),f.width?e.css(C,f.width):(e.css(C,"").appendTo(this.redrawContainer),b=e.width(),1>b%2&&(b+=1),c=e.css("maxWidth")||"",d=e.css("minWidth")||"",a=(c+d).indexOf("%")>-1?g.width()/100:0,c=(c.indexOf("%")>-1?a:1)*parseInt(c,10)||b,d=(d.indexOf("%")>-1?a:1)*parseInt(d,10)||0,b=c+d?Math.min(Math.max(b,d),c):b,e.css(C,Math.round(b)).appendTo(g)),this.drawing=0,self},destroy:function(){this.bgiframe&&this.bgiframe.remove(),this.qtip._unbind([a,this.qtip.tooltip],this._ns)}}),_=J.ie6=function(a){return 6===BROWSER.ie?new r(a):y},_.initialize="render",v.ie6={"^content|style$":function(){this.redraw()}}})}(window,document); |