/*
 Advanced Tooltips
 Version: 1.0.8
 (c) 2011 DMXzone.com
 @build 13-09-2011 11:47:37
*/
(function(c){function w(a){window.console&&window.console.log("[dmxTooltip] ",a)}function C(a){a=a||{};b.dataProvider=a.dataProvider||d.dataProvider;b.contentType=a.contentType||d.contentType;b.showEffect=a.showEffect?typeof u[a.showEffect]=="function"?a.showEffect:d.showEffect:d.showEffect;b.showDuration=a.showDuration||a.showDuration===0?/^slow|normal|fast$/.test(a.showDuration.toString())?a.showDuration.toString():isNaN(parseInt(a.showDuration,10))?d.showDuration:Math.max(parseInt(a.showDuration,
10),1):d.showDuration;b.showDelay=a.showDelay?isNaN(parseInt(a.showDelay,10))?d.showDelay:Math.max(parseInt(a.showDelay,10),1):d.showDelay;b.moveWithCursor=typeof a.moveWithCursor!="undefined"?a.moveWithCursor===!1?!1:a.moveWithCursor===!0?!0:d.moveWithCursor:d.moveWithCursor;b.mouseOffsetX=a.mouseOffsetX?!isNaN(parseInt(a.mouseOffsetX,10))?Math.max(parseInt(a.mouseOffsetX,10),10):d.mouseOffsetX:d.mouseOffsetX;b.mouseOffsetY=a.mouseOffsetY?!isNaN(parseInt(a.mouseOffsetY,10))?Math.max(a.mouseOffsetY,
20):d.mouseOffsetY:d.mouseOffsetY;b.onshow=typeof b.onshow=="function"?b.onshow:d.onshow;b.onhide=typeof b.onhide=="function"?b.onhide:d.onhide;b.showDirection=a.showDirection?/^in|out$/.test(a.showDirection.toString())?a.showDirection.toString():d.showDirection:d.showDirection;b.styleTheme=a.styleTheme?x[a.styleTheme.toString()]?a.styleTheme.toString():d.styleTheme:d.styleTheme;b.easing=a.easing?jQuery.easing[a.easing.toString()]?a.easing.toString():d.easing:d.easing;b.showCloseBtn=typeof a.showCloseBtn!=
"undefined"?a.showCloseBtn===!1?!1:a.showCloseBtn===!0?!0:d.showCloseBtn:d.showCloseBtn;b.closeEvent=a.closeEvent?/^mouseout|clickout|never$/.test(a.closeEvent.toString())?a.closeEvent.toString():d.closeEvent:d.closeEvent;b.showAt=a.showAt?/^bottomleft|bottomright|bottom|topleft|topright|top|left|lefttop|leftbottom|right|righttop|rightbottom|center|mouse|xy$/.test(a.showAt.toString())?a.showAt.toString():d.showAt:d.showAt;b.x=a.x?isNaN(parseInt(a.x,10))?/auto|cursor/i.test(a.x.toString())?a.x:d.x:
parseInt(a.x,10):d.x;b.y=a.y?isNaN(parseInt(a.y,10))?/auto|cursor/i.test(a.y.toString())?a.y:d.y:parseInt(a.y,10):d.y;b.w=a.w?isNaN(parseInt(a.w,10))?a.w=="auto"?a.w:d.w:parseInt(a.w,10):d.w;b.h=a.h?isNaN(parseInt(a.h,10))?a.h=="auto"?a.h:d.h:parseInt(a.h,10):d.h}function y(){if(window.tooltip&&window.tooltip.DMXTooltipHideTimeout)window.clearTimeout(window.tooltip.DMXTooltipHideTimeout),window.tooltip.DMXTooltipHideTimeout=null}function z(){if(window.tooltip&&window.tooltip.DMXTooltipShowTimeout)window.clearTimeout(window.tooltip.DMXTooltipShowTimeout),
window.tooltip.DMXTooltipShowTimeout=null}function v(){if(p)return'<iframe class="bgiframe" frameborder="0" tabindex="-1" src="javascript:false;" style="display:block;position:absolute;z-index:-1;top:expression(((parseInt(this.parentNode.currentStyle.borderTopWidth)||3)*-1)+\'px\');left:expression(((parseInt(this.parentNode.currentStyle.borderLeftWidth)||1)*-1)+\'px\');width:expression(this.parentNode.offsetWidth+\'px\');height:expression(this.parentNode.offsetHeight+\'px\');"/>';return""}function D(){var a=
'<div class="dmxtooltip">';a+=v();a+='<div class="dmxtooltipcontent">Empty tooltip</div>';a+="</div>";return a}function j(){var a="Styles";if(typeof window.stylesFolderName=="string")a=window.stylesFolderName;var b=t.replace(/JS_Sources/,a);return b=b.replace(/ScriptLibrary/,a+"/dmxTooltips")}function E(a){a=jQuery('<a href="'+String(a)+'" />');return String(String(a[0].href))}function F(a){var l="";b.styleTheme!="none"?(c('link[href$="/'+b.styleTheme+'.css"]').length||c("head").append('<link rel="stylesheet" type="text/css" href="'+
j()+b.styleTheme+"/"+b.styleTheme+'.css" />'),b.showCloseBtn&&p&&(l+='<a href="javascript:void(0);" onclick="hideDmxTooltip()" class="ieclosebtn"><img src="'+j()+'closebtn_faded.gif" border="0" onmouseover="this.src = \''+j()+"closebtn.gif';\"  onmouseout=\"this.src = '"+j()+'closebtn_faded.gif\';" title="Close" alt="Close" width="9" height="9" /></a>'),l+='<table cellspacing="0" cellpadding="0" border="0" class="'+b.styleTheme+' dmxtooltiptable">',l+=c.browser.msie?'<tbody class="IE'+(p?" ie6":"")+
'">':"<tbody>",l+=' <tr>  <td class="tl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>  <td class="t">'+(b.showDirection=="out"?'<div class="'+b.showAt+'">&nbsp;</div>':"&nbsp;")+'</td>  <td class="tr" align="left" valign="bottom">',b.showCloseBtn&&!p&&(l+='<a href="javascript:void(0);" onclick="hideDmxTooltip()" style="line-height:11px;text-align:left;"><img src="'+j()+'closebtn_faded.png" border="0" onmouseover="this.src = \''+j()+"closebtn.png';\"  onmouseout=\"this.src = '"+j()+'closebtn_faded.png\';" title="Close" alt="" align="left" vspace="0" style="left:0px;width:9px;height:9px;line-height:9px;" /></a>'),
l+='</td> </tr> <tr>  <td class="l"'+(b.showDirection=="out"?b.showAt.match(/top$/)?' valign="top"':b.showAt.match(/bottom$/)?' valign="bottom"':' valign="middle"':"")+">"+(b.showDirection=="out"?'<div class="'+b.showAt+'">&nbsp;</div>':"&nbsp;")+"</td>",l+='  <td class="c"',b.w&&b.w!="auto"&&(l+=' width="'+b.w+'"'),b.h&&b.h!="auto"&&(l+=' height="'+b.h+'"'),l+='>   <div class="dmxtooltipcontent" style="width:'+(b.w&&b.w!="auto"?b.w+"px":"auto")+";height:"+(b.h&&b.h!="auto"?b.h+"px":"100%")+';overflow:auto;"></div>  </td>  <td class="r"'+
(b.showDirection=="out"?b.showAt.match(/top$/)?' valign="top"':b.showAt.match(/bottom$/)?' valign="bottom"':' valign="middle"':"")+">"+(b.showDirection=="out"?'<div class="'+b.showAt+'">&nbsp;</div>':"&nbsp;")+'</td> </tr> <tr>  <td class="bl">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>  <td class="b">'+(b.showDirection=="out"?'<div class="'+b.showAt+'">&nbsp;</div>':"&nbsp;")+'</td>  <td class="br">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td> </tr></tbody></table>',c(".dmxtooltip").html(v()+l).find(".dmxtooltipcontent").html(a||
A())):c(".dmxtooltip").html(a||v()+'<div class="dmxtooltipcontent">'+A()+"</div>")}function G(){var a=[{file:"jquery.easing.1.3.js",type:"js"},{file:"structure.css",type:"css"},{file:"pointers.css",type:"css"}],b;for(b in a)a[b].type=="css"?c("head link[href$='"+a[b].file+"']").length||c("head").append('<link rel="stylesheet" type="text/css" href="'+j()+a[b].file+'" />'):a[b].type=="js"&&(c("head script[src$='"+a[b].file+"']").length||c("head").append('<script type="text/javascript" language="javascript" src="'+
t+a[b].file+'"><\/script>'));c.browser.msie&&(a='<style type="text/css">.dmxtooltiptable .tl,     .dmxtooltiptable .t ,          .dmxtooltiptable .tr,.dmxtooltiptable .l ,     .dmxtooltiptable .r ,          .dmxtooltiptable .bl,.dmxtooltiptable .b ,     .dmxtooltiptable .br,          .dmxtooltiptable .tl,.dmxtooltiptable .left,   .dmxtooltiptable .leftbottom,  .dmxtooltiptable .lefttop,.dmxtooltiptable .top,    .dmxtooltiptable .topleft,     .dmxtooltiptable .topright, .dmxtooltiptable .bottom, .dmxtooltiptable .bottomleft,  .dmxtooltiptable .bottomright, .dmxtooltiptable .right,  .dmxtooltiptable .rightbottom, .dmxtooltiptable .righttop { filter:progid:DXImageTransform.Microsoft.AlphaImageLoader();',
p&&(a+="behavior:url("+j()+"png.htc);"),a+="}<style>",c("head").append(a))}function H(a){if(RegExp("\\s","g").test(a))return!1;if(/^(http:\/\/|\.\/|\.\.\/|\/)[^\s]+/i.test(a))return!0;if(RegExp("^([a-z_\\+%,\\-\\/0-9:]+\\.[a-z0-9]+"+B+")$","i").test(a))return!0;return!1}function q(a){return b.contentType?b.contentType=="image":RegExp("^[a-z_\\+%,\\s\\-\\/\\.0-9:]+\\.(jpg|jpeg|gif|png)"+B+"$","i").test(a)}function A(){function a(a){if(f[a])return b.h=="auto"&&c(".dmxtooltip .dmxtooltipcontent").css({height:"auto"}),
'<img class="tooltipImage" src="'+a+'" />';else f[a]=new Image,f[a].onload=function(){b.h=="auto"&&c(".dmxtooltip .dmxtooltipcontent").css({height:"auto"});c(".dmxtooltip .dmxtooltipcontent").html('<img src="'+a+'" style="display:none"/>').find("> img").fadeIn("fast");m(window.tooltip.target)},f[a].onerror=function(){c(".dmxtooltip .dmxtooltipcontent .tooltipImage").length>0&&c(".dmxtooltip").css({width:"auto",height:"auto",opacity:1}).find(".dmxtooltipcontent").html('<span style="font-family:Arial, Verdana, sans-serif;font-size:12px;">The image "'+
a+'" was not found!</span>');try{delete f[a]}catch(b){f[a]=null}},f[a].src=a;return'<div style="margin-top:'+(b.h&&b.h!="auto"?b.h/2-8+"px":"auto")+';font-family:Arial, Verdana, sans-serif;font-size:12px;white-space:nowrap;overflow:hidden;"><img src="'+j()+'indicator_mozilla_blu.gif" align="absmiddle" class="tooltipImage" /> Loading image...</div>'}function l(a){a='<iframe frameborder="0" tabindex="-1" src="'+a+'" title="'+a+'" allowtransparency="true"';b.w&&(a+=' width="'+b.w+'"');b.h&&(a+=' height="'+
b.h+'"');a+=" />";return a}function e(a){var b=a.jquery?a:c(a);if(b.length===0)return String(a);b[0].parentNode&&(b=b.clone());return c("<span/>").append(b.css({visibility:"inherit"})).html()}function h(a){return c("<span/>").html(a).html()}function d(a){var b="",c=null;typeof a=="function"?c=a:typeof a=="string"&&typeof window[a]=="function"&&(c=window[a]);if(c)try{b=c()}catch(e){w(e)}return h(b)}var g=b.dataProvider,i="";switch((b.contentType||typeof g).toLowerCase()){case "text":i=c("<span/>").text(g).html();
break;case "html":i=h(g);break;case "url":i=l(g);break;case "image":i=a(g);break;case "jquery":i=e(g);break;case "function":i=d(g);break;case "string":i=q(g)?a(g):H(g)?l(g):/[<>]/.test(g)?h(g):/^#\w/.test(g)?e(g):c("<span/>").text(g).html();break;case "object":g.constructor==Array?i=g.join(""):g.jquery&&(i=e(g));break;default:i=g.toString()}return i}function m(a){if(!a||!a.target&&!a.nodeName&&!a==window)w("function setTooltipPosition called with invalid argument.");else{var l=c(window.tooltip),a=
a.target&&!a.nodeName?a.target:a,d=c(a==window?"body":a),a=l.outerWidth(),h=l.outerHeight(),f=/left|mouse/i.test(b.showAt)?b.styleTheme=="none"?0:11:0,g=/right|mouse/i.test(b.showAt)?b.styleTheme=="none"?0:11:0,i=/bottom|mouse/i.test(b.showAt)?b.styleTheme=="none"?0:14:0,o=/top|mouse/i.test(b.showAt)?b.styleTheme=="none"?0:11:0,r=d.outerWidth(),k=d.outerHeight(),n=d.offset().left,d=d.offset().top;switch(b.showAt){case "xy":e.y=b.y;e.x=b.x;break;case "topleft":e.y=d-h;e.x=n-f;break;case "topright":e.y=
d-h;e.x=n+r+g-a;break;case "top":e.y=d-h;e.x=n+Math.round(r/2-a/2);break;case "bottomleft":e.y=d+k;e.x=n-f;break;case "bottomright":e.y=d+k;e.x=n+r+g-a;break;case "bottom":e.y=d+k;e.x=n+Math.round(r/2-a/2);break;case "left":e.y=d+Math.round(k/2)-Math.round(h/2);e.x=n-a;break;case "lefttop":e.y=d-o;e.x=n-a;break;case "leftbottom":e.y=d+k+i-h;e.x=n-a;break;case "right":e.y=d+Math.round(k/2)-Math.round(h/2);e.x=n+r;break;case "righttop":e.y=d-o;e.x=n+r;break;case "rightbottom":e.y=d+k+i-h;e.x=n+r;break;
case "center":e.y=Math.round(d+k/2-h/2);e.x=n+Math.round(r/2)-Math.round(a/2);break;case "mouse":e.y=s.y+Math.max(b.mouseOffsetY,20)-o,e.x=s.x+Math.max(b.mouseOffsetX,10)-f}if(b.showDirection=="in")switch(b.showAt){case "bottomleft":case "bottomright":case "bottom":e.y=e.y-h+i;break;case "topleft":case "topright":case "top":e.y+=h-o;break;case "left":case "lefttop":case "leftbottom":e.x=e.x+a-f;break;case "right":case "righttop":case "rightbottom":e.x=e.x-a+g+f}l.css({top:Math.round(b.y=="cursor"?
s.y+Math.max(b.mouseOffsetY,20)-o:isNaN(e.y)?b.y:e.y)+"px",left:Math.round(b.x=="cursor"?s.x+Math.max(b.mouseOffsetX,10)-f:isNaN(e.x)?b.x:e.x)+"px"})}}function I(){var a=["closebtn_faded.gif","closebtn.gif"],b=["tl.png","t.png","tr.png","l.png","r.png","bl.png","b.png","br.png"],d=c("html").html(),e=[].concat(["indicator_mozilla_blu.gif","closebtn_faded.png","closebtn.png"]);p&&e.concat(a);for(var m in x)if(m!="none"&&RegExp("applyDMXTooltip\\s*\\([^\\)]+'"+m+"'","g").exec(d))for(a=0;a<b.length;a++)e.push(m+
"/"+b[a]);b=j();for(a=0;a<e.length;a++)d=b+""+e[a],f[d]=new Image,f[d].src=d}var d={dataProvider:"Empty tooltip",contentType:null,showEffect:"normal",showDuration:400,showDelay:600,moveWithCursor:!1,mouseOffsetX:10,mouseOffsetY:20,onshow:null,onhide:null,showDirection:"out",styleTheme:"white",easing:"easeOutQuad",showCloseBtn:!1,closeEvent:"mouseout",showAt:"bottomleft",x:0,y:0,w:0,h:0},p=window.XMLHttpRequest===void 0&&ActiveXObject!==void 0,J=function(a){var b=a;if(c.browser.msie)switch(a.toString()){case "easeInBack":case "easeInOutBack":b=
"easeOutBack";break;case "easeInElastic":case "easeInOutElastic":b="easeOutElastic"}return b},u={normal:function(a,d,e,h){if(q(b.dataProvider)&&f[b.dataProvider].complete)f[b.dataProvider].onload();m(a);c(this).css({opacity:1});typeof h=="function"&&window.setTimeout(function(){h.call(a)},2)},fade:function(a,d,e,h){if(q(b.dataProvider)&&f[b.dataProvider].complete)f[b.dataProvider].onload();m(a);c(this).animate({opacity:1},d,e,h)},slide:function(a,d,e,h){m(a);var j={opacity:1,width:0,height:0},g,i;
q(b.dataProvider)&&f[b.dataProvider]?(g=b.w=="auto"?f[b.dataProvider].width+46:c(this).outerWidth(),i=b.h=="auto"?f[b.dataProvider].height+58:c(this).outerHeight()):(g=c(this).outerWidth(),i=c(this).outerHeight());var o={opacity:1,width:g+"px",height:i+"px"};if(q(b.dataProvider))if(b.w=="auto"||b.h=="auto"){i=g=0;c(this).css(o);m(a);if(!window.tooltipSlideHelper)window.tooltipSlideHelper=function(a,k){a||(a=0);k||(k=0);if(f[b.dataProvider])if(k>750)f[b.dataProvider].onerror();else if(k++,a=Math.min(a+
0.01,1),c(window.tooltip).css({width:++g,height:++i,opacity:a}),!f[b.dataProvider].width||!f[b.dataProvider].height)window.setTimeout("window.tooltipSlideHelper("+a+", "+k+")",40);else{f[b.dataProvider].onload();var n={opacity:1,width:f[b.dataProvider].width+46,height:f[b.dataProvider].height+58};c(window.tooltip).animate(n,d,e,h)}};window.tooltipSlideHelper(1)}else m(a),f[b.dataProvider].onload(),c(this).css(j).animate(o,d,e,h);else c(this).css(j).animate(o,d,e,h)},slideandfade:function(a,d,e,h){m(a);
var j={opacity:0,width:0,height:0},g,i;q(b.dataProvider)&&f[b.dataProvider]?(g=b.w=="auto"?f[b.dataProvider].width+46:c(this).outerWidth(),i=b.h=="auto"?f[b.dataProvider].height+58:c(this).outerHeight()):(g=c(this).outerWidth(),i=c(this).outerHeight());var o={opacity:1,width:g,height:i};if(q(b.dataProvider))if(b.w=="auto"||b.h=="auto"){i=g=0;c(this).css(o);if(!window.tooltipSlideHelper)window.tooltipSlideHelper=function(a,k){a||(a=0);k||(k=0);if(f[b.dataProvider])if(k>750)f[b.dataProvider].onerror();
else if(k++,a=Math.min(a+0.01,1),c(window.tooltip).css({width:++g,height:++i,opacity:a}),!f[b.dataProvider].width||f[b.dataProvider].height)window.setTimeout("window.tooltipSlideHelper("+a+", "+k+")",40);else{var j={opacity:1,width:f[b.dataProvider].width+46,height:f[b.dataProvider].height+58};f[b.dataProvider].onload();c(window.tooltip).animate(j,d,e,h)}};window.tooltipSlideHelper()}else m(a),f[b.dataProvider].onload(),c(this).css(j).animate(o,d,e,h);else c(this).css(j).animate(o,d,e,h)},fly:function(a,
d,j,h){if(q(b.dataProvider)&&f[b.dataProvider].complete)f[b.dataProvider].onload();var p={top:e.y,left:e.x};m(a);a={top:e.y,left:e.x,opacity:1};c(this).css(p).animate(a,d,j,h)}};window.tooltip=null;var b={},s={x:0,y:0},e={x:0,y:0},t="",x={none:{haspointers:!1},yellow:{haspointers:!0},grey:{haspointers:!0},white:{haspointers:!0},blue:{haspointers:!0},red:{haspointers:!0},redbevel:{haspointers:!0},bluebevel:{haspointers:!0},greybevel:{haspointers:!0},darkgreybevel:{haspointers:!0},yellowbevel:{haspointers:!0}},
B="[\\?&;=-\\|\\\\/_a-z0-9\\+%]*",f={};c(function(){t=c("script[src$='dmxTooltips.js']").attr("src").replace(/dmxTooltips\.js$/,"");t=E(t);G();I();window.tooltip=c("body").prepend(D()).find(".dmxtooltip")[0];window.tooltip.target=null;c(c.browser.msie?document:window).bind("mousemove.tooltipNew",function(a){s.x=a.pageX;s.y=a.pageY});c(window.tooltip).bind("click.tooltip",function(a){a.stopPropagation()});window.setInterval(function(){window.tooltip.target||c(window.tooltip).css({visibility:"hidden"})},
1E3);c(window.tooltip).bind("mouseenter.tooltip",function(){y()})});c(window).bind("unload",function(){delete f});window.hideDmxTooltip=function(){c(window.tooltip).css({visibility:"hidden"})[0].target=null;c(window.tooltip)[0].animated=!1};window.showTooltip=function(a,e){y();if(window.tooltip&&window.tooltip.target&&window.tooltip.target==a)return!1;c(a).unbind("mouseleave.tooltip");c(a).unbind("mousemove.tooltip");c(window.tooltip).unbind("mouseleave.tooltip");c("body").unbind("click.tooltip");
c(window.tooltip).css({visibility:"hidden"});window.tooltip.target=a;z();c(window.tooltip).stop();c(window.tooltip)[0].animated=!1;window.tooltip.DMXTooltipShowTimeout=window.setTimeout(function(){a||(a=c("body")[0]);a.jquery&&(a.selector&&(a=c(a.selector)),a.length===0&&(a=c("body")),a=a[0]);typeof a=="string"&&(a=c(a),a.length===0&&(a=c("body")),a=a[0]);if(!a)return!1;C(e);F();switch(b.closeEvent){case "clickout":c("body").bind("click.tooltip",function(){c(window.tooltip.target).unbind("mousemove.tooltip");
c(window.tooltip).css({visibility:"hidden"})[0].target=null;c(window.tooltip)[0].animated=!1});break;case "closebtn":break;case "never":break;default:c(window.tooltip).bind("mouseleave.tooltip",function(a){if(!window.tooltip.target)return!0;if((a.toElement||a.relatedTarget)==this.target)return!0;window.tooltip.DMXTooltipHideTimeout=window.setTimeout(function(){c(window.tooltip.target).unbind("mousemove.tooltip");window.tooltip.target=null},500)}),c(a).bind("mouseleave.tooltip",function(b){jQuery.inArray(b.toElement||
b.relatedTarget,c(".dmxtooltip, .dmxtooltip *").add(c(this)))<0?(z(),window.tooltip.DMXTooltipHideTimeout=window.setTimeout(function(){c(window.tooltip.target).unbind("mousemove.tooltip");window.tooltip.target=null},500)):window.tooltip.target=a})}var d=typeof u[b.showEffect]=="function"?u[b.showEffect]:u.normal;b.showEffect!="fly"&&(b.y=="cursor"||b.x=="cursor")&&c(a).bind("mousemove.tooltip",function(){m(a)});c(window.tooltip).css({visibility:"visible",opacity:0,width:"auto",height:"auto"})[0].animated=
!0;d.call(window.tooltip,a,RegExp("^(normal|fast|slow)$","gi").test(b.showDuration.toString())?b.showDuration:parseInt(b.showDuration,10),J(b.easing),function(){c(window.tooltip)[0].animated=!1;typeof b.onshow=="function"&&b.onshow.call(window.tooltip);b.showEffect=="fly"&&(b.y=="cursor"||b.x=="cursor")&&c(a).bind("mousemove.tooltip",function(){m(a)});if(c.browser.msie&&!p)c(".dmxtooltip")[0].style.cssText=c(".dmxtooltip")[0].style.cssText.replace(/\bfilter\s*:[^;]*;/gi,"")})},e.showDelay||e.showDelay===
0?isNaN(e.showDelay)?d.showDelay:Math.max(parseInt(e.showDelay,10),1):d.showDelay)};c.fn.dmxTooltip=function(a){window.showTooltip(c(this)[0],a||{})}})(jQuery);

