").append(m.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,e||[a.responseText,b,a])}),this},m.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){m.fn[b]=function(a){return this.on(b,a)}}),m.expr.filters.animated=function(a){return m.grep(m.timers,function(b){return a===b.elem}).length};var cc=a.document.documentElement;function dc(a){return m.isWindow(a)?a:9===a.nodeType?a.defaultView||a.parentWindow:!1}m.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=m.css(a,"position"),l=m(a),n={};"static"===k&&(a.style.position="relative"),h=l.offset(),f=m.css(a,"top"),i=m.css(a,"left"),j=("absolute"===k||"fixed"===k)&&m.inArray("auto",[f,i])>-1,j?(d=l.position(),g=d.top,e=d.left):(g=parseFloat(f)||0,e=parseFloat(i)||0),m.isFunction(b)&&(b=b.call(a,c,h)),null!=b.top&&(n.top=b.top-h.top+g),null!=b.left&&(n.left=b.left-h.left+e),"using"in b?b.using.call(a,n):l.css(n)}},m.fn.extend({offset:function(a){if(arguments.length)return void 0===a?this:this.each(function(b){m.offset.setOffset(this,a,b)});var b,c,d={top:0,left:0},e=this[0],f=e&&e.ownerDocument;if(f)return b=f.documentElement,m.contains(b,e)?(typeof e.getBoundingClientRect!==K&&(d=e.getBoundingClientRect()),c=dc(f),{top:d.top+(c.pageYOffset||b.scrollTop)-(b.clientTop||0),left:d.left+(c.pageXOffset||b.scrollLeft)-(b.clientLeft||0)}):d},position:function(){if(this[0]){var a,b,c={top:0,left:0},d=this[0];return"fixed"===m.css(d,"position")?b=d.getBoundingClientRect():(a=this.offsetParent(),b=this.offset(),m.nodeName(a[0],"html")||(c=a.offset()),c.top+=m.css(a[0],"borderTopWidth",!0),c.left+=m.css(a[0],"borderLeftWidth",!0)),{top:b.top-c.top-m.css(d,"marginTop",!0),left:b.left-c.left-m.css(d,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||cc;while(a&&!m.nodeName(a,"html")&&"static"===m.css(a,"position"))a=a.offsetParent;return a||cc})}}),m.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,b){var c=/Y/.test(b);m.fn[a]=function(d){return V(this,function(a,d,e){var f=dc(a);return void 0===e?f?b in f?f[b]:f.document.documentElement[d]:a[d]:void(f?f.scrollTo(c?m(f).scrollLeft():e,c?e:m(f).scrollTop()):a[d]=e)},a,d,arguments.length,null)}}),m.each(["top","left"],function(a,b){m.cssHooks[b]=La(k.pixelPosition,function(a,c){return c?(c=Ja(a,b),Ha.test(c)?m(a).position()[b]+"px":c):void 0})}),m.each({Height:"height",Width:"width"},function(a,b){m.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){m.fn[d]=function(d,e){var f=arguments.length&&(c||"boolean"!=typeof d),g=c||(d===!0||e===!0?"margin":"border");return V(this,function(b,c,d){var e;return m.isWindow(b)?b.document.documentElement["client"+a]:9===b.nodeType?(e=b.documentElement,Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])):void 0===d?m.css(b,c,g):m.style(b,c,d,g)},b,f?d:void 0,f,null)}})}),m.fn.size=function(){return this.length},m.fn.andSelf=m.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return m});var ec=a.jQuery,fc=a.$;return m.noConflict=function(b){return a.$===m&&(a.$=fc),b&&a.jQuery===m&&(a.jQuery=ec),m},typeof b===K&&(a.jQuery=a.$=m),m});
/**
*
* Can show a tooltip over an element
* Content of tooltip is the title attribute value of the element
* Tested with Firefox, IE6, IE5.5, IE7, Konqueror
*
* To use it :
* 1.include this script on your page
* 2.insert this element somewhere in your page
*
* 3. style it in your CSS stylesheet (set color, background etc..). You must set
* this two style too :
* div#tooltip { position:absolute; visibility:hidden; ... }
* 4.the end. test it ! :-)
*
* @version 1.1
* @copyright 2004-2007 Laurent Jouanneau.
* @link http://ljouanneau.com/soft/javascript
* @licence release under LGPL Licence
*/
// the tooltip object
var tooltip = {
// setup properties of tooltip object
id:"tooltip",
offsetx : 0,
offsety : -40,
_x : -100,
_y : -100,
_tooltipElement:null,
_saveonmouseover:null
}
/**
* Open ToolTip. The title attribute of the htmlelement is the text of the tooltip
* Call this method on the mouseover event on your htmlelement
* ex :
*/
tooltip.show = function (htmlelement) {
// we save text of title attribute to avoid the showing of tooltip generated by browser
var text=htmlelement.getAttribute("title");
htmlelement.setAttribute("title","");
htmlelement.setAttribute("title_saved",text);
if (text == "Nouvelle-ZĂ©lande") {
this.offsetx = -100;
}else{
this.offsetx = 0;
}
if(document.getElementById){
this._tooltipElement = document.getElementById(this.id);
}else if ( document.all ) {
this._tooltipElement = document.all[this.id].style;
}
console.log(this._tooltipElement);
this._saveonmouseover = document.onmousemove;
document.onmousemove = this.mouseMove;
this._tooltipElement.innerHTML = text;
this.moveTo(this._x + this.offsetx , this._y + this.offsety);
console.log(this._x+"/"+this._y);
if(this._tooltipElement.style){
this._tooltipElement.style.visibility ="visible";
}else{
this._tooltipElement.visibility = "visible";
}
return false;
}
/**
* hide tooltip
* call this method on the mouseout event of the html element
* ex :
*/
tooltip.hide = function (htmlelement) {
htmlelement.setAttribute("title",htmlelement.getAttribute("title_saved"));
htmlelement.removeAttribute("title_saved");
if(this._tooltipElement.style){
this._tooltipElement.style.visibility ="hidden";
}else{
this._tooltipElement.visibility = "hidden";
}
document.onmousemove=this._saveonmouseover;
}
// Moves the tooltip element
tooltip.mouseMove = function (e) {
// we don't use "this" because this method is assign to an event of document
// and so is dereferenced
if(e == undefined)
e = event;
if( e.pageX != undefined){ // gecko, konqueror,
tooltip._x = e.pageX;
tooltip._y = e.pageY;
}else if(event != undefined && event.x != undefined && event.clientX == undefined){ // ie4 ?
tooltip._x = event.x;
tooltip._y = event.y;
}else if(e.clientX != undefined ){ // IE6, IE7, IE5.5
if(document.documentElement){
tooltip._x = e.clientX + ( document.documentElement.scrollLeft || document.body.scrollLeft);
tooltip._y = e.clientY + ( document.documentElement.scrollTop || document.body.scrollTop);
}else{
tooltip._x = e.clientX + document.body.scrollLeft;
tooltip._y = e.clientY + document.body.scrollTop;
}
/*}else if(event != undefined && event.x != undefined){ // IE6, IE7, IE5.5
tooltip.x = event.x + ( document.documentElement.scrollLeft || document.body.scrollLeft);
tooltip.y = event.y + ( document.documentElement.scrollTop || document.body.scrollTop);
*/
}else{
tooltip._x = 0;
tooltip._y = 0;
}
tooltip.moveTo( tooltip._x +tooltip.offsetx , tooltip._y + tooltip.offsety);
}
// Move the tooltip element
tooltip.moveTo = function (xL,yL) {
if(this._tooltipElement.style){
this._tooltipElement.style.left = xL +"px";
this._tooltipElement.style.top = yL +"px";
}else{
this._tooltipElement.left = xL;
this._tooltipElement.top = yL;
}
}