/*Created using Dean Edwards' packer.
http://dean.edwards.name/packer/*/

(function($){var p=document.documentElement,body=p.body;$.fn.tt=function(m){var n=$.extend({},$.fn.tt.defaults,m);return this.each(function(){var o=$.meta?$.extend({},n,j.data()):n;var j=$(this);j.cache={};j.ttTarget=$('<div />').appendTo('body');if(j.attr('id').length===0||!($('#'+o.ttIdPrefix+j.attr('id'))[0])){o.useTitle=true;var k=$('<div/>').hide()}else{var k=$('#'+o.ttIdPrefix+j.attr('id')).hide();var l=k.parent()}j.bind(o.showEvent,function(e){clearTimeout(j.hideTimer);clearTimeout(j.delayTimer);delayShowTip()}).bind(o.hideEvent,function(e){hideTip()});j.ttTarget.bind('mouseover',function(e){clearTimeout(j.hideTimer)}).bind('mouseout',function(e){hideTip()});function delayShowTip(){j.delayTimer=setTimeout(function(){showTip()},o.delay)}function hideTip(){clearTimeout(j.delayTimer);j.hideTimer=setTimeout(function(){$(k).fadeOut(o.fadeOut,function(){$(k).attr('style','').hide().removeClass(o.ttClass);$(j.ttTarget).html('');j.removeClass(o.activeClass);$(window).unbind('scroll');if(l){$(k).appendTo(l)}if(j.oldTitle){j.attr('title',j.oldTitle)}})},o.timeOut)}function showTip(){if(o.useTitle){var a=j.oldTitle=j.attr('title');if(a.length===0)return;a=a.replace(/\*\*([^*]*)\*\*/g,'<strong class="highlight">$1</strong>');a=a.replace(/\*_\*([^*]*)\*_\*/g,'<strong class="example">$1</strong>');var b=a.split(' - ');for(var i=0;i<b.length;i++){var c=i===0?'h3':'p';b[i]='<'+c+'>'+b[i]+'</'+c+'>'};$(k).html(a);j.attr('title','')}var d=o.ttClass!=='tt_tip'?{}:{border:'1px solid #666',background:'#ffd',padding:'.5em','-webkit-border-radius':'5px','-webkit-box-shadow':'0 1px 3px rgba(0,0,0,.3)','-moz-border-radius':'5px','-moz-box-shadow':'0 1px 3px rgba(0,0,0,.3)'};d=$.extend({},d,o.css);j.addClass(o.activeClass);$(k).appendTo(j.ttTarget).addClass(o.ttClass).css(d).css(positionTip()).fadeIn(o.fadeIn);$(window).bind('scroll',function(){positionTip()}).bind('resize',function(){j.cache={}})}function positionTip(){var a={vert:o.vAlign,hor:o.align};var b=j.cache.elmOffset||j.offset();j.cache.elmOffset=b;var c=j.cache.elmDim||{w:j.outerWidth(),h:j.outerHeight()};j.cache.elmDim=c;var d=j.cache.ttDim||{w:k.outerWidth(),h:k.outerHeight()};j.cache.ttDim=d;var e={left:$(body).scrollLeft(),top:$(body).scrollTop()};var f=j.cache.vp||{w:$(window).width(),h:$(window).height()};j.cache.vp=f;var g=j.cache.pos||{top:{above:b.top-d.h-o.distanceY,below:b.top+c.h+o.distanceY,center:b.top-d.h/2+c.h/2},left:{left:b.left-d.w-o.distanceX,right:b.left+c.w+o.distanceX,center:b.left-d.w/2+c.w/2,flushLeft:b.left,flushRight:b.left+c.w-d.w}};j.cache.pos=g;g.top.absTop=e.top+o.windowMargin;g.top.absBottom=f.h+e.top-d.h-o.windowMargin;g.left.absRight=f.w-d.w-o.windowMargin;g.left.absLeft=0+o.windowMargin;var h={above:g.top.above<g.top.absTop?false:true,below:g.top.below>g.top.absBottom?false:true,left:g.left.left<g.left.absLeft?false:true,right:g.left.right>g.left.absRight?false:true};if(!h.above&&!h.below)a.vert='absTop';else if((a.vert==='above'||a.vert==='center')&&!h.above)a.vert='absTop';else if((a.vert==='below'||a.vert==='center')&&!h.below)a.vert='absBottom';if(!h.left&&!h.right)a.hor='absLeft';else if((a.hor==='right'||a.hor==='flushRight'||a.hor==='center')&&!h.right)a.hor='absRight';else if((a.hor==='left'||a.hor==='flushLeft'||a.hor==='center')&&!h.left)a.hor='absLeft';return{position:'absolute',left:g.left[a.hor],top:g.top[a.vert]}}})};function cons(a){if(window.console&&window.console.log){console.log(a)}};$.fn.tt.defaults={showEvent:'mouseover',hideEvent:'mouseout',align:'flushLeft',vAlign:'above',windowMargin:5,distanceX:2,distanceY:2,ttClass:'tt_tip',activeClass:'tt_active',ttIdPrefix:'tt_',timeOut:1000,delay:250,fadeIn:100,fadeOut:250}})(jQuery);