jQuery.fn.extend({everyTime:function(b,c,d,e,a){return this.each(function(){jQuery.timer.add(this,b,c,d,e,a)})},oneTime:function(a,b,c){return this.each(function(){jQuery.timer.add(this,a,b,c,1)})},stopTime:function(a,b){return this.each(function(){jQuery.timer.remove(this,a,b)})}});jQuery.extend({timer:{guid:1,global:{},regex:/^([0-9]+)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1000,das:10000,hs:100000,ks:1000000},timeParse:function(c){if(c==undefined||c==null){return null}var a=this.regex.exec(jQuery.trim(c.toString()));if(a[2]){var b=parseInt(a[1],10);var d=this.powers[a[2]]||1;return b*d}else{return c}},add:function(e,c,d,g,h,b){var a=0;if(jQuery.isFunction(d)){if(!h){h=g}g=d;d=c}c=jQuery.timer.timeParse(c);if(typeof c!="number"||isNaN(c)||c<=0){return}if(h&&h.constructor!=Number){b=!!h;h=0}h=h||0;b=b||false;if(!e.$timers){e.$timers={}}if(!e.$timers[d]){e.$timers[d]={}}g.$timerID=g.$timerID||this.guid++;var f=function(){if(b&&this.inProgress){return}this.inProgress=true;if((++a>h&&h!==0)||g.call(e,a)===false){jQuery.timer.remove(e,d,g)}this.inProgress=false};f.$timerID=g.$timerID;if(!e.$timers[d][g.$timerID]){e.$timers[d][g.$timerID]=window.setInterval(f,c)}if(!this.global[d]){this.global[d]=[]}this.global[d].push(e)},remove:function(c,b,d){var e=c.$timers,a;if(e){if(!b){for(b in e){this.remove(c,b,d)}}else{if(e[b]){if(d){if(d.$timerID){window.clearInterval(e[b][d.$timerID]);delete e[b][d.$timerID]}}else{for(var d in e[b]){window.clearInterval(e[b][d]);delete e[b][d]}}for(a in e[b]){break}if(!a){a=null;delete e[b]}}}for(a in e){break}if(!a){c.$timers=null}}}}});if(jQuery.browser.msie){jQuery(window).one("unload",function(){var d=jQuery.timer.global;for(var a in d){var c=d[a],b=c.length;while(--b){jQuery.timer.remove(c[b],a)}}})}(function($){$.scheduler=function(){this.bucket={};return};$.scheduler.prototype={schedule:function(){var ctx={id:null,time:1000,repeat:false,protect:false,obj:null,func:function(){},args:[]};function _isfn(fn){return(!!fn&&typeof fn!="string"&&typeof fn[0]=="undefined"&&RegExp("function","i").test(fn+""))}var i=0;var override=false;if(typeof arguments[i]=="object"&&arguments.length>1){override=true;i++}if(typeof arguments[i]=="object"){for(var option in arguments[i]){if(typeof ctx[option]!="undefined"){ctx[option]=arguments[i][option]}}i++}if(typeof arguments[i]=="number"||(typeof arguments[i]=="string"&&arguments[i].match(RegExp("^[0-9]+[smhdw]$")))){ctx.time=arguments[i++]}if(typeof arguments[i]=="boolean"){ctx.repeat=arguments[i++]}if(typeof arguments[i]=="boolean"){ctx.protect=arguments[i++]}if(typeof arguments[i]=="object"&&typeof arguments[i+1]=="string"&&_isfn(arguments[i][arguments[i+1]])){ctx.obj=arguments[i++];ctx.func=arguments[i++]}else{if(typeof arguments[i]!="undefined"&&(_isfn(arguments[i])||typeof arguments[i]=="string")){ctx.func=arguments[i++]}}while(typeof arguments[i]!="undefined"){ctx.args.push(arguments[i++])}if(override){if(typeof arguments[1]=="object"){for(var option in arguments[0]){if(typeof ctx[option]!="undefined"&&typeof arguments[1][option]=="undefined"){ctx[option]=arguments[0][option]}}}else{for(var option in arguments[0]){if(typeof ctx[option]!="undefined"){ctx[option]=arguments[0][option]}}}i++}ctx._scheduler=this;ctx._handle=null;var match=String(ctx.time).match(RegExp("^([0-9]+)([smhdw])$"));if(match&&match[0]!="undefined"&&match[1]!="undefined"){ctx.time=String(parseInt(match[1])*{s:1000,m:1000*60,h:1000*60*60,d:1000*60*60*24,w:1000*60*60*24*7}[match[2]])}if(ctx.id==null){ctx.id=(String(ctx.repeat)+":"+String(ctx.protect)+":"+String(ctx.time)+":"+String(ctx.obj)+":"+String(ctx.func)+":"+String(ctx.args))}if(ctx.protect){if(typeof this.bucket[ctx.id]!="undefined"){return this.bucket[ctx.id]}}if(!_isfn(ctx.func)){if(ctx.obj!=null&&typeof ctx.obj=="object"&&typeof ctx.func=="string"&&_isfn(ctx.obj[ctx.func])){ctx.func=ctx.obj[ctx.func]}else{ctx.func=eval("function () { "+ctx.func+" }")}}ctx._handle=this._schedule(ctx);this.bucket[ctx.id]=ctx;return ctx},reschedule:function(ctx){if(typeof ctx=="string"){ctx=this.bucket[ctx]}ctx._handle=this._schedule(ctx);return ctx},_schedule:function(ctx){var trampoline=function(){var obj=(ctx.obj!=null?ctx.obj:ctx);(ctx.func).apply(obj,ctx.args);if(typeof(ctx._scheduler).bucket[ctx.id]!="undefined"&&ctx.repeat){(ctx._scheduler)._schedule(ctx)}else{delete (ctx._scheduler).bucket[ctx.id]}};return setTimeout(trampoline,ctx.time)},cancel:function(ctx){if(typeof ctx=="string"){ctx=this.bucket[ctx]}if(typeof ctx=="object"){clearTimeout(ctx._handle);delete this.bucket[ctx.id]}}};$.extend({scheduler$:new $.scheduler(),schedule:function(){return $.scheduler$.schedule.apply($.scheduler$,arguments)},reschedule:function(){return $.scheduler$.reschedule.apply($.scheduler$,arguments)},cancel:function(){return $.scheduler$.cancel.apply($.scheduler$,arguments)}});$.fn.extend({schedule:function(){var a=[{}];for(var i=0;i<arguments.length;i++){a.push(arguments[i])}return this.each(function(){a[0]={id:this,obj:this};return $.schedule.apply($,a)})}})})(jQuery);(function(d){d.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","color","outlineColor"],function(f,e){d.fx.step[e]=function(g){if(g.state==0){g.start=c(g.elem,e);g.end=b(g.end)}g.elem.style[e]="rgb("+[Math.max(Math.min(parseInt((g.pos*(g.end[0]-g.start[0]))+g.start[0]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[1]-g.start[1]))+g.start[1]),255),0),Math.max(Math.min(parseInt((g.pos*(g.end[2]-g.start[2]))+g.start[2]),255),0)].join(",")+")"}});function b(f){var e;if(f&&f.constructor==Array&&f.length==3){return f}if(e=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(f)){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}if(e=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(f)){return[parseFloat(e[1])*2.55,parseFloat(e[2])*2.55,parseFloat(e[3])*2.55]}if(e=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(f)){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}if(e=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(f)){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}return a[d.trim(f).toLowerCase()]}function c(g,e){var f;do{f=d.curCSS(g,e);if(f!=""&&f!="transparent"||d.nodeName(g,"body")){break}e="backgroundColor"}while(g=g.parentNode);return b(f)}var a={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery);(function(a){a.fn.hoverIntent=function(m,k){var n={sensitivity:7,interval:100,timeout:0};n=a.extend(n,k?{over:m,out:k}:m);var p,o,h,d;var e=function(f){p=f.pageX;o=f.pageY};var c=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);if((Math.abs(h-p)+Math.abs(d-o))<n.sensitivity){a(f).unbind("mousemove",e);f.hoverIntent_s=1;return n.over.apply(f,[g])}else{h=p;d=o;f.hoverIntent_t=setTimeout(function(){c(g,f)},n.interval)}};var j=function(g,f){f.hoverIntent_t=clearTimeout(f.hoverIntent_t);f.hoverIntent_s=0;return n.out.apply(f,[g])};var b=function(q){var f=this;var g=(q.type=="mouseover"?q.fromElement:q.toElement)||q.relatedTarget;while(g&&g!=this){try{g=g.parentNode}catch(q){g=this}}if(g==this){if(a.browser.mozilla){if(q.type=="mouseout"){f.mtout=setTimeout(function(){l(q,f)},30)}else{if(f.mtout){f.mtout=clearTimeout(f.mtout)}}}return}else{if(f.mtout){f.mtout=clearTimeout(f.mtout)}l(q,f)}};var l=function(q,f){var g=jQuery.extend({},q);if(f.hoverIntent_t){f.hoverIntent_t=clearTimeout(f.hoverIntent_t)}if(q.type=="mouseover"){h=g.pageX;d=g.pageY;a(f).bind("mousemove",e);if(f.hoverIntent_s!=1){f.hoverIntent_t=setTimeout(function(){c(g,f)},n.interval)}}else{a(f).unbind("mousemove",e);if(f.hoverIntent_s==1){f.hoverIntent_t=setTimeout(function(){j(g,f)},n.timeout)}}};return this.mouseover(b).mouseout(b)}})(jQuery);(function(b){function a(e,d){var c=this;e=jQuery(e);var f=jQuery(document.createElement("div")).addClass(d.baseClass).addClass((d.fixed)?d.fixedClass:"").addClass((d.persistent)?d.persistentClass:"").html(d.content).appendTo(e);if(!d.hidden){f.show()}else{f.hide()}if(!d.persistent){e.hover(function(g){c.show(g)},function(){c.hide()});if(!d.fixed){e.mousemove(function(g){if(f.css("display")!=="none"){c.updatePos(g)}})}}else{e.click(function(g){if(g.target===e.get(0)){if(f.css("display")!=="none"){c.hide()}else{c.show()}}});jQuery(window).mousedown(function(h){if(f.css("display")!=="none"){var g=(d.focus)?jQuery(h.target).parents(".tooltip").andSelf().filter(function(){return this===f.get(0)}).length:0;if(g===0){c.hide()}}})}jQuery.extend(c,{getVersion:function(){return[1,2,0]},getParent:function(){return e},getTooltip:function(){return f},getPos:function(){return f.offset()},setPos:function(j,h){var g=e.offset();if(typeof j=="string"){j=parseInt(j)+g.left}if(typeof h=="string"){h=parseInt(h)+g.top}f.css({left:j,top:h});return c},show:function(g){d.onBeforeShow.call(c);c.updatePos((d.fixed)?null:g);switch(d.showEffect){case"fade":f.fadeIn(d.showTime);break;case"slide":f.slideDown(d.showTime,c.updatePos);break;case"custom":d.showCustom.call(f,d.showTime);break;default:case"none":f.show();break}f.addClass(d.activeClass);d.onShow.call(c);return c},hide:function(){d.onBeforeHide.call(c);switch(d.hideEffect){case"fade":f.fadeOut(d.hideTime);break;case"slide":f.slideUp(d.hideTime);break;case"custom":d.hideCustom.call(f,d.hideTime);break;default:case"none":f.hide();break}f.removeClass(d.activeClass);d.onHide.call(c);return c},update:function(g){f.html(g);d.content=g;return c},load:function(g,h){d.beforeContentLoad.call(c);f.load(g,h,function(){d.onContentLoad.call(c)});return c},boundryCheck:function(m,k){var j=m+f.outerWidth();var h=k+f.outerHeight();var g=jQuery(window).width()+jQuery(window).scrollLeft();var l=jQuery(window).height()+jQuery(window).scrollTop();return[(j>=g),(h>=l)]},updatePos:function(j){var o=f.outerWidth();var q=f.outerHeight();if(!j&&d.fixed){if(d.position.constructor==Array){h=parseInt(d.position[0]);g=parseInt(d.position[1])}else{if(jQuery(d.position).attr("nodeType")===1){var n=jQuery(d.position).offset();h=n.left;g=n.top}else{var p=e.offset();var m=e.outerWidth();var k=e.outerHeight();switch(d.position){case"top":var h=p.left-(o/2)+(m/2);var g=p.top-q;break;case"bottom":var h=p.left-(o/2)+(m/2);var g=p.top+k;break;case"left":var h=p.left-o;var g=p.top-(q/2)+(k/2);break;case"right":var h=p.left+m;var g=p.top-(q/2)+(k/2);break;default:case"default":var h=(m/2)+p.left+20;var g=p.top;break}}}}else{var h=j.pageX;var g=j.pageY}if(typeof d.position!="object"){h=h+d.offset[0];g=g+d.offset[1];if(d.boundryCheck){var l=c.boundryCheck(h,g);if(l[0]){h=h-(o/2)-(2*d.offset[0])}if(l[1]){g=g-(q/2)-(2*d.offset[1])}}}else{if(typeof d.position[0]=="string"){h=String(h)}if(typeof d.position[1]=="string"){g=String(g)}}c.setPos(h,g);return c}})}jQuery.fn.simpletip=function(c){var d=jQuery(this).eq(typeof c=="number"?c:0).data("simpletip");if(d){return d}var e={content:"A simple tooltip",persistent:false,focus:false,hidden:true,position:"default",offset:[0,0],boundryCheck:true,fixed:true,showEffect:"fade",showTime:150,showCustom:null,hideEffect:"fade",hideTime:150,hideCustom:null,baseClass:"tooltip",activeClass:"active",fixedClass:"fixed",persistentClass:"persistent",focusClass:"focus",onBeforeShow:function(){},onShow:function(){},onBeforeHide:function(){},onHide:function(){},beforeContentLoad:function(){},onContentLoad:function(){}};jQuery.extend(e,c);this.each(function(){var f=new a(jQuery(this),e);jQuery(this).data("simpletip",f)});return this}})();(function(b){var a=b.scrollTo=function(d,e,g){b(window).scrollTo(d,e,g)};a.defaults={axis:"xy",duration:parseFloat(b.fn.jquery)>=1.3?0:1};a.window=function(d){return b(window).scrollable()};b.fn.scrollable=function(){return this.map(function(){var d=this,e=!d.nodeName||b.inArray(d.nodeName.toLowerCase(),["iframe","#document","html","body"])!=-1;if(!e){return d}var g=(d.contentWindow||d).document||d.ownerDocument||d;return b.browser.safari||g.compatMode=="BackCompat"?g.body:g.documentElement})};b.fn.scrollTo=function(e,f,d){if(typeof f=="object"){d=f;f=0}if(typeof d=="function"){d={onAfter:d}}if(e=="max"){e=9000000000}d=b.extend({},a.defaults,d);f=f||d.speed||d.duration;d.queue=d.queue&&d.axis.length>1;if(d.queue){f/=2}d.offset=c(d.offset);d.over=c(d.over);return this.scrollable().each(function(){var h=this,v=b(h),s=e,r,m={},n=v.is("html,body");switch(typeof s){case"number":case"string":if(/^([+-]=)?\d+(\.\d+)?(px)?$/.test(s)){s=c(s);break}s=b(s,this);case"object":if(s.is||s.style){r=(s=b(s)).offset()}}b.each(d.axis.split(""),function(g,p){var t=p=="x"?"Left":"Top",k=t.toLowerCase(),u="scroll"+t,q=h[u],o=p=="x"?"Width":"Height";if(r){m[u]=r[k]+(n?0:q-v.offset()[k]);if(d.margin){m[u]-=parseInt(s.css("margin"+t))||0;m[u]-=parseInt(s.css("border"+t+"Width"))||0}m[u]+=d.offset[k]||0;if(d.over[k]){m[u]+=s[o.toLowerCase()]()*d.over[k]}}else{m[u]=s[k]}if(/^\d+$/.test(m[u])){m[u]=m[u]<=0?0:Math.min(m[u],j(o))}if(!g&&d.queue){if(q!=m[u]){l(d.onAfterFirst)}delete m[u]}});l(d.onAfter);function l(g){v.animate(m,f,d.easing,g&&function(){g.call(this,e,d)})}function j(g){var o="scroll"+g;if(!n){return h[o]}var p="client"+g,k=h.ownerDocument.documentElement,q=h.ownerDocument.body;return Math.max(k[o],q[o])-Math.min(k[p],q[p])}}).end()};function c(d){return typeof d=="object"?d:{top:d,left:d}}})(jQuery);(function(a){a.suggest=function(p,g){var c=a(p).attr("autocomplete","off");var f=a(document.createElement("ul"));var o=false;var d=c.val().length;var r=[];var q=0;f.addClass(g.resultsClass).appendTo("body");k();a(window).load(k).resize(k);c.blur(function(){setTimeout(function(){f.hide()},200)});if(a.browser.msie){try{f.bgiframe()}catch(t){}}if(a.browser.mozilla){c.keypress(n)}else{c.keydown(n)}function k(){var e=c.offset();f.css({top:(e.top+p.offsetHeight)+"px",left:e.left+"px"})}function n(x){if((/27$|38$|40$/.test(x.keyCode)&&f.is(":visible"))||(/^13$|^9$/.test(x.keyCode)&&v())){if(x.preventDefault){x.preventDefault()}if(x.stopPropagation){x.stopPropagation()}x.cancelBubble=true;x.returnValue=false;switch(x.keyCode){case 38:l();break;case 40:u();break;case 9:case 13:s();break;case 27:f.hide();break}}else{if(c.val().length!=d){if(o){clearTimeout(o)}o=setTimeout(m,g.delay);d=c.val().length}}}function m(){k();var e=a.trim(c.val());if(e.length>=g.minchars){cached=w(e);if(cached){j(cached.items)}else{a.get(g.source,{q:e},function(x){f.hide();var y=b(x,e);j(y);h(e,y,x.length)})}}else{f.hide()}}function w(x){for(var e=0;e<r.length;e++){if(r[e]["q"]==x){r.unshift(r.splice(e,1)[0]);return r[0]}}return false}function h(z,e,x){while(r.length&&(q+x>g.maxCacheSize)){var y=r.pop();q-=y.size}r.push({q:z,size:x,items:e});q+=x}function j(e){if(!e){return}if(!e.length){if(g.showNoResultsLabel){f.html('<div style="padding:10px;">'+g.showNoResultsLabel+"</div>");f.show()}else{f.hide()}return}if(c.is(":hidden")){return}var y="";for(var x=0;x<e.length;x++){y+="<li>"+e[x]+"</li>"}f.html(y).show();f.children("li").mouseover(function(){f.children("li").removeClass(g.selectClass);a(this).addClass(g.selectClass)}).click(function(z){z.preventDefault();z.stopPropagation();s()})}function b(e,A){var x=[];var B=e.split(g.delimiter);for(var z=0;z<B.length;z++){var y=a.trim(B[z]);if(y){y=y.replace(new RegExp(A,"ig"),function(C){return'<span class="'+g.matchClass+'">'+C+"</span>"});x[x.length]=y}}return x}function v(){if(!f.is(":visible")){return false}var e=f.children("li."+g.selectClass);if(!e.length){e=false}return e}function s(){$currentResult=v();if($currentResult){c.val($currentResult.text());d=c.val().length;f.hide();if(g.onSelect){g.onSelect.apply(c[0])}}}function u(){$currentResult=v();if($currentResult){$currentResult.removeClass(g.selectClass).next().addClass(g.selectClass)}else{f.children("li:first-child").addClass(g.selectClass)}}function l(){$currentResult=v();if($currentResult){$currentResult.removeClass(g.selectClass).prev().addClass(g.selectClass)}else{f.children("li:last-child").addClass(g.selectClass)}}};a.fn.suggest=function(c,b){if(!c){return}b=b||{};b.source=c;b.delay=b.delay||100;b.resultsClass=b.resultsClass||"ac_results";b.selectClass=b.selectClass||"ac_over";b.matchClass=b.matchClass||"ac_match";b.minchars=b.minchars||2;b.delimiter=b.delimiter||"\n";b.onSelect=b.onSelect||false;b.showNoResultsLabel=b.showNoResultsLabel||"No s'ha trobat cap resultat.";b.maxCacheSize=b.maxCacheSize||65536;this.each(function(){new a.suggest(this,b)});return this}})(jQuery);(function(D){D.fn.qtip=function(a,h){var d,j,b,k,e,f,g,c;if(typeof a=="string"){if(typeof D(this).data("qtip")!=="object"){D.fn.qtip.log.error.call(self,1,D.fn.qtip.constants.NO_TOOLTIP_PRESENT,false)}if(a=="api"){return D(this).data("qtip").interfaces[D(this).data("qtip").current]}else{if(a=="interfaces"){return D(this).data("qtip").interfaces}}}else{if(!a){a={}}if(typeof a.content!=="object"||(a.content.jquery&&a.content.length>0)){a.content={text:a.content}}if(typeof a.content.title!=="object"){a.content.title={text:a.content.title}}if(typeof a.position!=="object"){a.position={corner:a.position}}if(typeof a.position.corner!=="object"){a.position.corner={target:a.position.corner,tooltip:a.position.corner}}if(typeof a.show!=="object"){a.show={when:a.show}}if(typeof a.show.when!=="object"){a.show.when={event:a.show.when}}if(typeof a.show.effect!=="object"){a.show.effect={type:a.show.effect}}if(typeof a.hide!=="object"){a.hide={when:a.hide}}if(typeof a.hide.when!=="object"){a.hide.when={event:a.hide.when}}if(typeof a.hide.effect!=="object"){a.hide.effect={type:a.hide.effect}}if(typeof a.style!=="object"){a.style={name:a.style}}a.style=G(a.style);k=D.extend(true,{},D.fn.qtip.defaults,a);k.style=I.call({options:k},k.style);k.user=D.extend(true,{},a)}return D(this).each(function(){if(typeof a=="string"){f=a.toLowerCase();b=D(this).qtip("interfaces");if(typeof b=="object"){if(h===true&&f=="destroy"){while(b.length>0){b[b.length-1].destroy()}}else{if(h!==true){b=[D(this).qtip("api")]}for(d=0;d<b.length;d++){if(f=="destroy"){b[d].destroy()}else{if(b[d].status.rendered===true){if(f=="show"){b[d].show()}else{if(f=="hide"){b[d].hide()}else{if(f=="focus"){b[d].focus()}else{if(f=="disable"){b[d].disable(true)}else{if(f=="enable"){b[d].disable(false)}}}}}}}}}}}else{g=D.extend(true,{},k);g.hide.effect.length=k.hide.effect.length;g.show.effect.length=k.show.effect.length;if(g.position.container===false){g.position.container=D(document.body)}if(g.position.target===false){g.position.target=D(this)}if(g.show.when.target===false){g.show.when.target=D(this)}if(g.hide.when.target===false){g.hide.when.target=D(this)}j=D.fn.qtip.interfaces.length;for(d=0;d<j;d++){if(typeof D.fn.qtip.interfaces[d]=="undefined"){j=d;break}}e=new F(D(this),g,j);D.fn.qtip.interfaces[j]=e;if(typeof D(this).data("qtip")=="object"){if(typeof D(this).attr("qtip")==="undefined"){D(this).data("qtip").current=D(this).data("qtip").interfaces.length}D(this).data("qtip").interfaces.push(e)}else{D(this).data("qtip",{current:0,interfaces:[e]})}if(g.content.prerender===false&&g.show.when.event!==false&&g.show.ready!==true){g.show.when.target.bind(g.show.when.event+".qtip-"+j+"-create",{qtip:j},function(l){c=D.fn.qtip.interfaces[l.data.qtip];c.options.show.when.target.unbind(c.options.show.when.event+".qtip-"+l.data.qtip+"-create");c.cache.mouse={x:l.pageX,y:l.pageY};u.call(c);c.options.show.when.target.trigger(c.options.show.when.event)})}else{e.cache.mouse={x:g.show.when.target.offset().left,y:g.show.when.target.offset().top};u.call(e)}}})};function F(b,c,a){var d=this;d.id=a;d.options=c;d.status={animated:false,rendered:false,disabled:false,focused:false};d.elements={target:b.addClass(d.options.style.classes.target),tooltip:null,wrapper:null,content:null,contentWrapper:null,title:null,button:null,tip:null,bgiframe:null};d.cache={mouse:{},position:{},toggle:0};d.timers={};D.extend(d,d.options.api,{show:function(h){var e,g;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"show")}if(d.elements.tooltip.css("display")!=="none"){return d}d.elements.tooltip.stop(true,false);e=d.beforeShow.call(d,h);if(e===false){return d}function f(){if(d.options.position.type!=="static"){d.focus()}d.onShow.call(d,h);if(D.browser.msie){d.elements.tooltip.get(0).style.removeAttribute("filter")}}d.cache.toggle=1;if(d.options.position.type!=="static"){d.updatePosition(h,(d.options.show.effect.length>0))}if(typeof d.options.show.solo=="object"){g=D(d.options.show.solo)}else{if(d.options.show.solo===true){g=D("div.qtip").not(d.elements.tooltip)}}if(g){g.each(function(){if(D(this).qtip("api").status.rendered===true){D(this).qtip("api").hide()}})}if(typeof d.options.show.effect.type=="function"){d.options.show.effect.type.call(d.elements.tooltip,d.options.show.effect.length);d.elements.tooltip.queue(function(){f();D(this).dequeue()})}else{switch(d.options.show.effect.type.toLowerCase()){case"fade":d.elements.tooltip.fadeIn(d.options.show.effect.length,f);break;case"slide":d.elements.tooltip.slideDown(d.options.show.effect.length,function(){f();if(d.options.position.type!=="static"){d.updatePosition(h,true)}});break;case"grow":d.elements.tooltip.show(d.options.show.effect.length,f);break;default:d.elements.tooltip.show(null,f);break}d.elements.tooltip.addClass(d.options.style.classes.active)}return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_SHOWN,"show")},hide:function(g){var e;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"hide")}else{if(d.elements.tooltip.css("display")==="none"){return d}}clearTimeout(d.timers.show);d.elements.tooltip.stop(true,false);e=d.beforeHide.call(d,g);if(e===false){return d}function f(){d.onHide.call(d,g)}d.cache.toggle=0;if(typeof d.options.hide.effect.type=="function"){d.options.hide.effect.type.call(d.elements.tooltip,d.options.hide.effect.length);d.elements.tooltip.queue(function(){f();D(this).dequeue()})}else{switch(d.options.hide.effect.type.toLowerCase()){case"fade":d.elements.tooltip.fadeOut(d.options.hide.effect.length,f);break;case"slide":d.elements.tooltip.slideUp(d.options.hide.effect.length,f);break;case"grow":d.elements.tooltip.hide(d.options.hide.effect.length,f);break;default:d.elements.tooltip.hide(null,f);break}d.elements.tooltip.removeClass(d.options.style.classes.active)}return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_HIDDEN,"hide")},updatePosition:function(q,o){var f,M,k,n,r,O,m,p,g,e,l,h,N,j;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updatePosition")}else{if(d.options.position.type=="static"){return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.CANNOT_POSITION_STATIC,"updatePosition")}}M={position:{left:0,top:0},dimensions:{height:0,width:0},corner:d.options.position.corner.target};k={position:d.getPosition(),dimensions:d.getDimensions(),corner:d.options.position.corner.tooltip};if(d.options.position.target!=="mouse"){if(d.options.position.target.get(0).nodeName.toLowerCase()=="area"){n=d.options.position.target.attr("coords").split(",");for(f=0;f<n.length;f++){n[f]=parseInt(n[f])}r=d.options.position.target.parent("map").attr("name");O=D('img[usemap="#'+r+'"]:first').offset();M.position={left:Math.floor(O.left+n[0]),top:Math.floor(O.top+n[1])};switch(d.options.position.target.attr("shape").toLowerCase()){case"rect":M.dimensions={width:Math.ceil(Math.abs(n[2]-n[0])),height:Math.ceil(Math.abs(n[3]-n[1]))};break;case"circle":M.dimensions={width:n[2]+1,height:n[2]+1};break;case"poly":M.dimensions={width:n[0],height:n[1]};for(f=0;f<n.length;f++){if(f%2==0){if(n[f]>M.dimensions.width){M.dimensions.width=n[f]}if(n[f]<n[0]){M.position.left=Math.floor(O.left+n[f])}}else{if(n[f]>M.dimensions.height){M.dimensions.height=n[f]}if(n[f]<n[1]){M.position.top=Math.floor(O.top+n[f])}}}M.dimensions.width=M.dimensions.width-(M.position.left-O.left);M.dimensions.height=M.dimensions.height-(M.position.top-O.top);break;default:return D.fn.qtip.log.error.call(d,4,D.fn.qtip.constants.INVALID_AREA_SHAPE,"updatePosition");break}M.dimensions.width-=2;M.dimensions.height-=2}else{if(d.options.position.target.add(document.body).length===1){M.position={left:D(document).scrollLeft(),top:D(document).scrollTop()};M.dimensions={height:D(window).height(),width:D(window).width()}}else{if(typeof d.options.position.target.attr("qtip")!=="undefined"){M.position=d.options.position.target.qtip("api").cache.position}else{M.position=d.options.position.target.offset()}M.dimensions={height:d.options.position.target.outerHeight(),width:d.options.position.target.outerWidth()}}}m=D.extend({},M.position);if(M.corner.search(/right/i)!==-1){m.left+=M.dimensions.width}if(M.corner.search(/bottom/i)!==-1){m.top+=M.dimensions.height}if(M.corner.search(/((top|bottom)Middle)|center/)!==-1){m.left+=(M.dimensions.width/2)}if(M.corner.search(/((left|right)Middle)|center/)!==-1){m.top+=(M.dimensions.height/2)}}else{M.position=m={left:d.cache.mouse.x,top:d.cache.mouse.y};M.dimensions={height:1,width:1}}if(k.corner.search(/right/i)!==-1){m.left-=k.dimensions.width}if(k.corner.search(/bottom/i)!==-1){m.top-=k.dimensions.height}if(k.corner.search(/((top|bottom)Middle)|center/)!==-1){m.left-=(k.dimensions.width/2)}if(k.corner.search(/((left|right)Middle)|center/)!==-1){m.top-=(k.dimensions.height/2)}p=(D.browser.msie)?1:0;g=(D.browser.msie&&parseInt(D.browser.version.charAt(0))===6)?1:0;if(d.options.style.border.radius>0){if(k.corner.search(/Left/)!==-1){m.left-=d.options.style.border.radius}else{if(k.corner.search(/Right/)!==-1){m.left+=d.options.style.border.radius}}if(k.corner.search(/Top/)!==-1){m.top-=d.options.style.border.radius}else{if(k.corner.search(/Bottom/)!==-1){m.top+=d.options.style.border.radius}}}if(p){if(k.corner.search(/top/)!==-1){m.top-=p}else{if(k.corner.search(/bottom/)!==-1){m.top+=p}}if(k.corner.search(/left/)!==-1){m.left-=p}else{if(k.corner.search(/right/)!==-1){m.left+=p}}if(k.corner.search(/leftMiddle|rightMiddle/)!==-1){m.top-=1}}if(d.options.position.adjust.screen===true){m=v.call(d,m,M,k)}if(d.options.position.target==="mouse"&&d.options.position.adjust.mouse===true){if(d.options.position.adjust.screen===true&&d.elements.tip){l=d.elements.tip.attr("rel")}else{l=d.options.position.corner.tooltip}m.left+=(l.search(/right/i)!==-1)?-6:6;m.top+=(l.search(/bottom/i)!==-1)?-6:6}if(!d.elements.bgiframe&&D.browser.msie&&parseInt(D.browser.version.charAt(0))==6){D("select, object").each(function(){h=D(this).offset();h.bottom=h.top+D(this).height();h.right=h.left+D(this).width();if(m.top+k.dimensions.height>=h.top&&m.left+k.dimensions.width>=h.left){z.call(d)}})}m.left+=d.options.position.adjust.x;m.top+=d.options.position.adjust.y;N=d.getPosition();if(m.left!=N.left||m.top!=N.top){j=d.beforePositionUpdate.call(d,q);if(j===false){return d}d.cache.position=m;if(o===true){d.status.animated=true;d.elements.tooltip.animate(m,200,"swing",function(){d.status.animated=false})}else{d.elements.tooltip.css(m)}d.onPositionUpdate.call(d,q);if(typeof q!=="undefined"&&q.type&&q.type!=="mousemove"){D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_POSITION_UPDATED,"updatePosition")}}return d},updateWidth:function(f){var e;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateWidth")}else{if(f&&typeof f!=="number"){return D.fn.qtip.log.error.call(d,2,"newWidth must be of type number","updateWidth")}}e=d.elements.contentWrapper.siblings().add(d.elements.tip).add(d.elements.button);if(!f){if(typeof d.options.style.width.value=="number"){f=d.options.style.width.value}else{d.elements.tooltip.css({width:"auto"});e.hide();if(D.browser.msie){d.elements.wrapper.add(d.elements.contentWrapper.children()).css({zoom:"normal"})}f=d.getDimensions().width+1;if(!d.options.style.width.value){if(f>d.options.style.width.max){f=d.options.style.width.max}if(f<d.options.style.width.min){f=d.options.style.width.min}}}}if(f%2!==0){f-=1}d.elements.tooltip.width(f);e.show();if(d.options.style.border.radius){d.elements.tooltip.find(".qtip-betweenCorners").each(function(g){D(this).width(f-(d.options.style.border.radius*2))})}if(D.browser.msie){d.elements.wrapper.add(d.elements.contentWrapper.children()).css({zoom:"1"});d.elements.wrapper.width(f);if(d.elements.bgiframe){d.elements.bgiframe.width(f).height(d.getDimensions.height)}}return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_WIDTH_UPDATED,"updateWidth")},updateStyle:function(g){var h,f,e,k,j;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateStyle")}else{if(typeof g!=="string"||!D.fn.qtip.styles[g]){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.STYLE_NOT_DEFINED,"updateStyle")}}d.options.style=I.call(d,D.fn.qtip.styles[g],d.options.user.style);d.elements.content.css(t(d.options.style));if(d.options.content.title.text!==false){d.elements.title.css(t(d.options.style.title,true))}d.elements.contentWrapper.css({borderColor:d.options.style.border.color});if(d.options.style.tip.corner!==false){if(D("<canvas>").get(0).getContext){h=d.elements.tooltip.find(".qtip-tip canvas:first");e=h.get(0).getContext("2d");e.clearRect(0,0,300,300);k=h.parent("div[rel]:first").attr("rel");j=H(k,d.options.style.tip.size.width,d.options.style.tip.size.height);B.call(d,h,j,d.options.style.tip.color||d.options.style.border.color)}else{if(D.browser.msie){h=d.elements.tooltip.find('.qtip-tip [nodeName="shape"]');h.attr("fillcolor",d.options.style.tip.color||d.options.style.border.color)}}}if(d.options.style.border.radius>0){d.elements.tooltip.find(".qtip-betweenCorners").css({backgroundColor:d.options.style.border.color});if(D("<canvas>").get(0).getContext){f=C(d.options.style.border.radius);d.elements.tooltip.find(".qtip-wrapper canvas").each(function(){e=D(this).get(0).getContext("2d");e.clearRect(0,0,300,300);k=D(this).parent("div[rel]:first").attr("rel");s.call(d,D(this),f[k],d.options.style.border.radius,d.options.style.border.color)})}else{if(D.browser.msie){d.elements.tooltip.find('.qtip-wrapper [nodeName="arc"]').each(function(){D(this).attr("fillcolor",d.options.style.border.color)})}}}return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_STYLE_UPDATED,"updateStyle")},updateContent:function(f,k){var h,e,g;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateContent")}else{if(!f){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateContent")}}h=d.beforeContentUpdate.call(d,f);if(typeof h=="string"){f=h}else{if(h===false){return}}if(D.browser.msie){d.elements.contentWrapper.children().css({zoom:"normal"})}if(f.jquery&&f.length>0){f.clone(true).appendTo(d.elements.content).show()}else{d.elements.content.html(f)}e=d.elements.content.find("img[complete=false]");if(e.length>0){g=0;e.each(function(l){D('<img src="'+D(this).attr("src")+'" />').load(function(){if(++g==e.length){j()}})})}else{j()}function j(){d.updateWidth();if(k!==false){if(d.options.position.type!=="static"){d.updatePosition(d.elements.tooltip.is(":visible"),true)}if(d.options.style.tip.corner!==false){w.call(d)}}}d.onContentUpdate.call(d);return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_CONTENT_UPDATED,"loadContent")},loadContent:function(g,h,f){var j;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"loadContent")}j=d.beforeContentLoad.call(d);if(j===false){return d}if(f=="post"){D.post(g,h,e)}else{D.get(g,h,e)}function e(k){d.onContentLoad.call(d);D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_CONTENT_LOADED,"loadContent");d.updateContent(k)}return d},updateTitle:function(e){if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"updateTitle")}else{if(!e){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.NO_CONTENT_PROVIDED,"updateTitle")}}returned=d.beforeTitleUpdate.call(d);if(returned===false){return d}if(d.elements.button){d.elements.button=d.elements.button.clone(true)}d.elements.title.html(e);if(d.elements.button){d.elements.title.prepend(d.elements.button)}d.onTitleUpdate.call(d);return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_TITLE_UPDATED,"updateTitle")},focus:function(f){var j,e,g,h;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"focus")}else{if(d.options.position.type=="static"){return D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.CANNOT_FOCUS_STATIC,"focus")}}j=parseInt(d.elements.tooltip.css("z-index"));e=6000+D("div.qtip[qtip]").length-1;if(!d.status.focused&&j!==e){h=d.beforeFocus.call(d,f);if(h===false){return d}D("div.qtip[qtip]").not(d.elements.tooltip).each(function(){if(D(this).qtip("api").status.rendered===true){g=parseInt(D(this).css("z-index"));if(typeof g=="number"&&g>-1){D(this).css({zIndex:parseInt(D(this).css("z-index"))-1})}D(this).qtip("api").status.focused=false}});d.elements.tooltip.css({zIndex:e});d.status.focused=true;d.onFocus.call(d,f);D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_FOCUSED,"focus")}return d},disable:function(e){if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"disable")}if(e){if(!d.status.disabled){d.status.disabled=true;D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_DISABLED,"disable")}else{D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.TOOLTIP_ALREADY_DISABLED,"disable")}}else{if(d.status.disabled){d.status.disabled=false;D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_ENABLED,"disable")}else{D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.TOOLTIP_ALREADY_ENABLED,"disable")}}return d},destroy:function(){var f,e,g;e=d.beforeDestroy.call(d);if(e===false){return d}if(d.status.rendered){d.options.show.when.target.unbind("mousemove.qtip",d.updatePosition);d.options.show.when.target.unbind("mouseout.qtip",d.hide);d.options.show.when.target.unbind(d.options.show.when.event+".qtip");d.options.hide.when.target.unbind(d.options.hide.when.event+".qtip");d.elements.tooltip.unbind(d.options.hide.when.event+".qtip");d.elements.tooltip.unbind("mouseover.qtip",d.focus);d.elements.tooltip.remove()}else{d.options.show.when.target.unbind(d.options.show.when.event+".qtip-create")}if(typeof d.elements.target.data("qtip")=="object"){g=d.elements.target.data("qtip").interfaces;if(typeof g=="object"&&g.length>0){for(f=0;f<g.length-1;f++){if(g[f].id==d.id){g.splice(f,1)}}}}delete D.fn.qtip.interfaces[d.id];if(typeof g=="object"&&g.length>0){d.elements.target.data("qtip").current=g.length-1}else{d.elements.target.removeData("qtip")}d.onDestroy.call(d);D.fn.qtip.log.error.call(d,1,D.fn.qtip.constants.EVENT_DESTROYED,"destroy");return d.elements.target},getPosition:function(){var f,e;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getPosition")}f=(d.elements.tooltip.css("display")!=="none")?false:true;if(f){d.elements.tooltip.css({visiblity:"hidden"}).show()}e=d.elements.tooltip.offset();if(f){d.elements.tooltip.css({visiblity:"visible"}).hide()}return e},getDimensions:function(){var f,e;if(!d.status.rendered){return D.fn.qtip.log.error.call(d,2,D.fn.qtip.constants.TOOLTIP_NOT_RENDERED,"getDimensions")}f=(!d.elements.tooltip.is(":visible"))?true:false;if(f){d.elements.tooltip.css({visiblity:"hidden"}).show()}e={height:d.elements.tooltip.outerHeight(),width:d.elements.tooltip.outerWidth()};if(f){d.elements.tooltip.css({visiblity:"visible"}).hide()}return e}})}function u(){var f,b,d,e,c,g,a;f=this;f.beforeRender.call(f);f.status.rendered=true;f.elements.tooltip='<div qtip="'+f.id+'" class="qtip '+(f.options.style.classes.tooltip||f.options.style)+'"style="display:none; -moz-border-radius:0; -webkit-border-radius:0; border-radius:0;position:'+f.options.position.type+';">  <div class="qtip-wrapper" style="position:relative; overflow:hidden; text-align:left;">    <div class="qtip-contentWrapper" style="overflow:hidden;">       <div class="qtip-content '+f.options.style.classes.content+'"></div></div></div></div>';f.elements.tooltip=D(f.elements.tooltip);f.elements.tooltip.appendTo(f.options.position.container);f.elements.tooltip.data("qtip",{current:0,interfaces:[f]});f.elements.wrapper=f.elements.tooltip.children("div:first");f.elements.contentWrapper=f.elements.wrapper.children("div:first").css({background:f.options.style.background});f.elements.content=f.elements.contentWrapper.children("div:first").css(t(f.options.style));if(D.browser.msie){f.elements.wrapper.add(f.elements.content).css({zoom:1})}if(f.options.hide.when.event=="unfocus"){f.elements.tooltip.attr("unfocus",true)}if(typeof f.options.style.width.value=="number"){f.updateWidth()}if(D("<canvas>").get(0).getContext||D.browser.msie){if(f.options.style.border.radius>0){x.call(f)}else{f.elements.contentWrapper.css({border:f.options.style.border.width+"px solid "+f.options.style.border.color})}if(f.options.style.tip.corner!==false){E.call(f)}}else{f.elements.contentWrapper.css({border:f.options.style.border.width+"px solid "+f.options.style.border.color});f.options.style.border.radius=0;f.options.style.tip.corner=false;D.fn.qtip.log.error.call(f,2,D.fn.qtip.constants.CANVAS_VML_NOT_SUPPORTED,"render")}if((typeof f.options.content.text=="string"&&f.options.content.text.length>0)||(f.options.content.text.jquery&&f.options.content.text.length>0)){d=f.options.content.text}else{if(typeof f.elements.target.attr("title")=="string"&&f.elements.target.attr("title").length>0){d=f.elements.target.attr("title").replace("\\n","<br />");f.elements.target.attr("title","")}else{if(typeof f.elements.target.attr("alt")=="string"&&f.elements.target.attr("alt").length>0){d=f.elements.target.attr("alt").replace("\\n","<br />");f.elements.target.attr("alt","")}else{d=" ";D.fn.qtip.log.error.call(f,1,D.fn.qtip.constants.NO_VALID_CONTENT,"render")}}}if(f.options.content.title.text!==false){A.call(f)}f.updateContent(d);y.call(f);if(f.options.show.ready===true){f.show()}if(f.options.content.url!==false){e=f.options.content.url;c=f.options.content.data;g=f.options.content.method||"get";f.loadContent(e,c,g)}f.onRender.call(f);D.fn.qtip.log.error.call(f,1,D.fn.qtip.constants.EVENT_RENDERED,"render")}function x(){var m,e,n,c,g,p,l,k,a,f,h,b,d,o,j;m=this;m.elements.wrapper.find(".qtip-borderBottom, .qtip-borderTop").remove();n=m.options.style.border.width;c=m.options.style.border.radius;g=m.options.style.border.color||m.options.style.tip.color;p=C(c);l={};for(e in p){l[e]='<div rel="'+e+'" style="'+((e.search(/Left/)!==-1)?"left":"right")+":0; position:absolute; height:"+c+"px; width:"+c+'px; overflow:hidden; line-height:0.1px; font-size:1px">';if(D("<canvas>").get(0).getContext){l[e]+='<canvas height="'+c+'" width="'+c+'" style="vertical-align: top"></canvas>'}else{if(D.browser.msie){k=c*2+3;l[e]+='<v:arc stroked="false" fillcolor="'+g+'" startangle="'+p[e][0]+'" endangle="'+p[e][1]+'" style="width:'+k+"px; height:"+k+"px; margin-top:"+((e.search(/bottom/)!==-1)?-2:-1)+"px; margin-left:"+((e.search(/Right/)!==-1)?p[e][2]-3.5:-1)+'px; vertical-align:top; display:inline-block; behavior:url(#default#VML)"></v:arc>'}}l[e]+="</div>"}a=m.getDimensions().width-(Math.max(n,c)*2);f='<div class="qtip-betweenCorners" style="height:'+c+"px; width:"+a+"px; overflow:hidden; background-color:"+g+'; line-height:0.1px; font-size:1px;">';h='<div class="qtip-borderTop" dir="ltr" style="height:'+c+"px; margin-left:"+c+'px; line-height:0.1px; font-size:1px; padding:0;">'+l.topLeft+l.topRight+f;m.elements.wrapper.prepend(h);b='<div class="qtip-borderBottom" dir="ltr" style="height:'+c+"px; margin-left:"+c+'px; line-height:0.1px; font-size:1px; padding:0;">'+l.bottomLeft+l.bottomRight+f;m.elements.wrapper.append(b);if(D("<canvas>").get(0).getContext){m.elements.wrapper.find("canvas").each(function(){d=p[D(this).parent("[rel]:first").attr("rel")];s.call(m,D(this),d,c,g)})}else{if(D.browser.msie){m.elements.tooltip.append('<v:image style="behavior:url(#default#VML);"></v:image>')}}o=Math.max(c,(c+(n-c)));j=Math.max(n-c,0);m.elements.contentWrapper.css({border:"0px solid "+g,borderWidth:j+"px "+o+"px"})}function s(c,a,e,d){var b=c.get(0).getContext("2d");b.fillStyle=d;b.beginPath();b.arc(a[0],a[1],e,0,Math.PI*2,false);b.fill()}function E(c){var e,f,a,d,b;e=this;if(e.elements.tip!==null){e.elements.tip.remove()}f=e.options.style.tip.color||e.options.style.border.color;if(e.options.style.tip.corner===false){return}else{if(!c){c=e.options.style.tip.corner}}a=H(c,e.options.style.tip.size.width,e.options.style.tip.size.height);e.elements.tip='<div class="'+e.options.style.classes.tip+'" dir="ltr" rel="'+c+'" style="position:absolute; height:'+e.options.style.tip.size.height+"px; width:"+e.options.style.tip.size.width+'px; margin:0 auto; line-height:0.1px; font-size:1px;">';if(D("<canvas>").get(0).getContext){e.elements.tip+='<canvas height="'+e.options.style.tip.size.height+'" width="'+e.options.style.tip.size.width+'"></canvas>'}else{if(D.browser.msie){d=e.options.style.tip.size.width+","+e.options.style.tip.size.height;b="m"+a[0][0]+","+a[0][1];b+=" l"+a[1][0]+","+a[1][1];b+=" "+a[2][0]+","+a[2][1];b+=" xe";e.elements.tip+='<v:shape fillcolor="'+f+'" stroked="false" filled="true" path="'+b+'" coordsize="'+d+'" style="width:'+e.options.style.tip.size.width+"px; height:"+e.options.style.tip.size.height+"px; line-height:0.1px; display:inline-block; behavior:url(#default#VML); vertical-align:"+((c.search(/top/)!==-1)?"bottom":"top")+'"></v:shape>';e.elements.tip+='<v:image style="behavior:url(#default#VML);"></v:image>';e.elements.contentWrapper.css("position","relative")}}e.elements.tooltip.prepend(e.elements.tip+"</div>");e.elements.tip=e.elements.tooltip.find("."+e.options.style.classes.tip).eq(0);if(D("<canvas>").get(0).getContext){B.call(e,e.elements.tip.find("canvas:first"),a,f)}if(c.search(/top/)!==-1&&D.browser.msie&&parseInt(D.browser.version.charAt(0))===6){e.elements.tip.css({marginTop:-4})}w.call(e,c)}function B(c,a,d){var b=c.get(0).getContext("2d");b.fillStyle=d;b.beginPath();b.moveTo(a[0][0],a[0][1]);b.lineTo(a[1][0],a[1][1]);b.lineTo(a[2][0],a[2][1]);b.fill()}function w(d){var e,b,f,a,c;e=this;if(e.options.style.tip.corner===false||!e.elements.tip){return}if(!d){d=e.elements.tip.attr("rel")}b=positionAdjust=(D.browser.msie)?1:0;e.elements.tip.css(d.match(/left|right|top|bottom/)[0],0);if(d.search(/top|bottom/)!==-1){if(D.browser.msie){if(parseInt(D.browser.version.charAt(0))===6){positionAdjust=(d.search(/top/)!==-1)?-3:1}else{positionAdjust=(d.search(/top/)!==-1)?1:2}}if(d.search(/Middle/)!==-1){e.elements.tip.css({left:"50%",marginLeft:-(e.options.style.tip.size.width/2)})}else{if(d.search(/Left/)!==-1){e.elements.tip.css({left:e.options.style.border.radius-b})}else{if(d.search(/Right/)!==-1){e.elements.tip.css({right:e.options.style.border.radius+b})}}}if(d.search(/top/)!==-1){e.elements.tip.css({top:-positionAdjust})}else{e.elements.tip.css({bottom:positionAdjust})}}else{if(d.search(/left|right/)!==-1){if(D.browser.msie){positionAdjust=(parseInt(D.browser.version.charAt(0))===6)?1:((d.search(/left/)!==-1)?1:2)}if(d.search(/Middle/)!==-1){e.elements.tip.css({top:"50%",marginTop:-(e.options.style.tip.size.height/2)})}else{if(d.search(/Top/)!==-1){e.elements.tip.css({top:e.options.style.border.radius-b})}else{if(d.search(/Bottom/)!==-1){e.elements.tip.css({bottom:e.options.style.border.radius+b})}}}if(d.search(/left/)!==-1){e.elements.tip.css({left:-positionAdjust})}else{e.elements.tip.css({right:positionAdjust})}}}f="padding-"+d.match(/left|right|top|bottom/)[0];a=e.options.style.tip.size[(f.search(/left|right/)!==-1)?"width":"height"];e.elements.tooltip.css("padding",0);e.elements.tooltip.css(f,a);if(D.browser.msie&&parseInt(D.browser.version.charAt(0))==6){c=parseInt(e.elements.tip.css("margin-top"))||0;c+=parseInt(e.elements.content.css("margin-top"))||0;e.elements.tip.css({marginTop:c})}}function A(){var a=this;if(a.elements.title!==null){a.elements.title.remove()}a.elements.title=D('<div class="'+a.options.style.classes.title+'">').css(t(a.options.style.title,true)).css({zoom:(D.browser.msie)?1:0}).prependTo(a.elements.contentWrapper);if(a.options.content.title.text){a.updateTitle.call(a,a.options.content.title.text)}if(a.options.content.title.button!==false&&typeof a.options.content.title.button=="string"){a.elements.button=D('<a class="'+a.options.style.classes.button+'" style="float:right; position: relative"></a>').css(t(a.options.style.button,true)).html(a.options.content.title.button).prependTo(a.elements.title).click(function(b){if(!a.status.disabled){a.hide(b)}})}}function y(){var e,c,d,f;e=this;c=e.options.show.when.target;d=e.options.hide.when.target;if(e.options.hide.fixed){d=d.add(e.elements.tooltip)}if(e.options.hide.when.event=="inactive"){f=["click","dblclick","mousedown","mouseup","mousemove","mouseout","mouseenter","mouseleave","mouseover"];function g(h){if(e.status.disabled===true){return}clearTimeout(e.timers.inactive);e.timers.inactive=setTimeout(function(){D(f).each(function(){d.unbind(this+".qtip-inactive");e.elements.content.unbind(this+".qtip-inactive")});e.hide(h)},e.options.hide.delay)}}else{if(e.options.hide.fixed===true){e.elements.tooltip.bind("mouseover.qtip",function(){if(e.status.disabled===true){return}clearTimeout(e.timers.hide)})}}function a(h){if(e.status.disabled===true){return}if(e.options.hide.when.event=="inactive"){D(f).each(function(){d.bind(this+".qtip-inactive",g);e.elements.content.bind(this+".qtip-inactive",g)});g()}clearTimeout(e.timers.show);clearTimeout(e.timers.hide);e.timers.show=setTimeout(function(){e.show(h)},e.options.show.delay)}function b(h){if(e.status.disabled===true){return}if(e.options.hide.fixed===true&&e.options.hide.when.event.search(/mouse(out|leave)/i)!==-1&&D(h.relatedTarget).parents("div.qtip[qtip]").length>0){h.stopPropagation();h.preventDefault();clearTimeout(e.timers.hide);return false}clearTimeout(e.timers.show);clearTimeout(e.timers.hide);e.elements.tooltip.stop(true,true);e.timers.hide=setTimeout(function(){e.hide(h)},e.options.hide.delay)}if((e.options.show.when.target.add(e.options.hide.when.target).length===1&&e.options.show.when.event==e.options.hide.when.event&&e.options.hide.when.event!=="inactive")||e.options.hide.when.event=="unfocus"){e.cache.toggle=0;c.bind(e.options.show.when.event+".qtip",function(h){if(e.cache.toggle==0){a(h)}else{b(h)}})}else{c.bind(e.options.show.when.event+".qtip",a);if(e.options.hide.when.event!=="inactive"){d.bind(e.options.hide.when.event+".qtip",b)}}if(e.options.position.type.search(/(fixed|absolute)/)!==-1){e.elements.tooltip.bind("mouseover.qtip",e.focus)}if(e.options.position.target==="mouse"&&e.options.position.type!=="static"){c.bind("mousemove.qtip",function(h){e.cache.mouse={x:h.pageX,y:h.pageY};if(e.status.disabled===false&&e.options.position.adjust.mouse===true&&e.options.position.type!=="static"&&e.elements.tooltip.css("display")!=="none"){e.updatePosition(h)}})}}function v(g,f,a){var b,j,d,c,h,e;b=this;if(a.corner=="center"){return f.position}j=D.extend({},g);c={x:false,y:false};h={left:(j.left<D.fn.qtip.cache.screen.scroll.left),right:(j.left+a.dimensions.width+2>=D.fn.qtip.cache.screen.width+D.fn.qtip.cache.screen.scroll.left),top:(j.top<D.fn.qtip.cache.screen.scroll.top),bottom:(j.top+a.dimensions.height+2>=D.fn.qtip.cache.screen.height+D.fn.qtip.cache.screen.scroll.top)};d={left:(h.left&&(a.corner.search(/right/i)!=-1||(a.corner.search(/right/i)==-1&&!h.right))),right:(h.right&&(a.corner.search(/left/i)!=-1||(a.corner.search(/left/i)==-1&&!h.left))),top:(h.top&&a.corner.search(/top/i)==-1),bottom:(h.bottom&&a.corner.search(/bottom/i)==-1)};if(d.left){if(b.options.position.target!=="mouse"){j.left=f.position.left+f.dimensions.width}else{j.left=b.cache.mouse.x}c.x="Left"}else{if(d.right){if(b.options.position.target!=="mouse"){j.left=f.position.left-a.dimensions.width}else{j.left=b.cache.mouse.x-a.dimensions.width}c.x="Right"}}if(d.top){if(b.options.position.target!=="mouse"){j.top=f.position.top+f.dimensions.height}else{j.top=b.cache.mouse.y}c.y="top"}else{if(d.bottom){if(b.options.position.target!=="mouse"){j.top=f.position.top-a.dimensions.height}else{j.top=b.cache.mouse.y-a.dimensions.height}c.y="bottom"}}if(j.left<0){j.left=g.left;c.x=false}if(j.top<0){j.top=g.top;c.y=false}if(b.options.style.tip.corner!==false){j.corner=new String(a.corner);if(c.x!==false){j.corner=j.corner.replace(/Left|Right|Middle/,c.x)}if(c.y!==false){j.corner=j.corner.replace(/top|bottom/,c.y)}if(j.corner!==b.elements.tip.attr("rel")){E.call(b,j.corner)}}return j}function t(b,c){var a,d;a=D.extend(true,{},b);for(d in a){if(c===true&&d.search(/(tip|classes)/i)!==-1){delete a[d]}else{if(!c&&d.search(/(width|border|tip|title|classes|user)/i)!==-1){delete a[d]}}}return a}function G(a){if(typeof a.tip!=="object"){a.tip={corner:a.tip}}if(typeof a.tip.size!=="object"){a.tip.size={width:a.tip.size,height:a.tip.size}}if(typeof a.border!=="object"){a.border={width:a.border}}if(typeof a.width!=="object"){a.width={value:a.width}}if(typeof a.width.max=="string"){a.width.max=parseInt(a.width.max.replace(/([0-9]+)/i,"$1"))}if(typeof a.width.min=="string"){a.width.min=parseInt(a.width.min.replace(/([0-9]+)/i,"$1"))}if(typeof a.tip.size.x=="number"){a.tip.size.width=a.tip.size.x;delete a.tip.size.x}if(typeof a.tip.size.y=="number"){a.tip.size.height=a.tip.size.y;delete a.tip.size.y}return a}function I(){var f,e,d,a,c,b;f=this;d=[true,{}];for(e=0;e<arguments.length;e++){d.push(arguments[e])}a=[D.extend.apply(D,d)];while(typeof a[0].name=="string"){a.unshift(G(D.fn.qtip.styles[a[0].name]))}a.unshift(true,{classes:{tooltip:"qtip-"+(arguments[0].name||"defaults")}},D.fn.qtip.styles.defaults);c=D.extend.apply(D,a);b=(D.browser.msie)?1:0;c.tip.size.width+=b;c.tip.size.height+=b;if(c.tip.size.width%2>0){c.tip.size.width+=1}if(c.tip.size.height%2>0){c.tip.size.height+=1}if(c.tip.corner===true){c.tip.corner=(f.options.position.corner.tooltip==="center")?false:f.options.position.corner.tooltip}return c}function H(a,b,c){var d={bottomRight:[[0,0],[b,c],[b,0]],bottomLeft:[[0,0],[b,0],[0,c]],topRight:[[0,c],[b,0],[b,c]],topLeft:[[0,0],[0,c],[b,c]],topMiddle:[[0,c],[b/2,0],[b,c]],bottomMiddle:[[0,0],[b,0],[b/2,c]],rightMiddle:[[0,0],[b,c/2],[0,c]],leftMiddle:[[b,0],[b,c],[0,c/2]]};d.leftTop=d.bottomRight;d.rightTop=d.bottomLeft;d.leftBottom=d.topRight;d.rightBottom=d.topLeft;return d[a]}function C(b){var a;if(D("<canvas>").get(0).getContext){a={topLeft:[b,b],topRight:[0,b],bottomLeft:[b,0],bottomRight:[0,0]}}else{if(D.browser.msie){a={topLeft:[-90,90,0],topRight:[-90,90,-b],bottomLeft:[90,270,0],bottomRight:[90,270,-b]}}}return a}function z(){var c,b,a;c=this;a=c.getDimensions();b='<iframe class="qtip-bgiframe" frameborder="0" tabindex="-1" src="javascript:false" style="display:block; position:absolute; z-index:-1; filter:alpha(opacity=\'0\'); border: 1px solid red; height:'+a.height+"px; width:"+a.width+'px" />';c.elements.bgiframe=c.elements.wrapper.prepend(b).children(".qtip-bgiframe:first")}D(document).ready(function(){D.fn.qtip.cache={screen:{scroll:{left:D(window).scrollLeft(),top:D(window).scrollTop()},width:D(window).width(),height:D(window).height()}};var a;D(window).bind("resize scroll",function(b){clearTimeout(a);a=setTimeout(function(){if(b.type==="scroll"){D.fn.qtip.cache.screen.scroll={left:D(window).scrollLeft(),top:D(window).scrollTop()}}else{D.fn.qtip.cache.screen.width=D(window).width();D.fn.qtip.cache.screen.height=D(window).height()}for(i=0;i<D.fn.qtip.interfaces.length;i++){var c=D.fn.qtip.interfaces[i];if(c.status.rendered===true&&(c.options.position.type!=="static"||c.options.position.adjust.scroll&&b.type==="scroll"||c.options.position.adjust.resize&&b.type==="resize")){c.updatePosition(b,true)}}},100)});D(document).bind("mousedown.qtip",function(b){if(D(b.target).parents("div.qtip").length===0){D(".qtip[unfocus]").each(function(){var c=D(this).qtip("api");if(D(this).is(":visible")&&!c.status.disabled&&D(b.target).add(c.elements.target).length>1){c.hide(b)}})}})});D.fn.qtip.interfaces=[];D.fn.qtip.log={error:function(){return this}};D.fn.qtip.constants={};D.fn.qtip.defaults={content:{prerender:false,text:false,url:false,data:null,title:{text:false,button:false}},position:{target:false,corner:{target:"bottomRight",tooltip:"topLeft"},adjust:{x:0,y:0,mouse:true,screen:false,scroll:true,resize:true},type:"absolute",container:false},show:{when:{target:false,event:"mouseover"},effect:{type:"fade",length:100},delay:140,solo:false,ready:false},hide:{when:{target:false,event:"mouseout"},effect:{type:"fade",length:100},delay:0,fixed:false},api:{beforeRender:function(){},onRender:function(){},beforePositionUpdate:function(){},onPositionUpdate:function(){},beforeShow:function(){},onShow:function(){},beforeHide:function(){},onHide:function(){},beforeContentUpdate:function(){},onContentUpdate:function(){},beforeContentLoad:function(){},onContentLoad:function(){},beforeTitleUpdate:function(){},onTitleUpdate:function(){},beforeDestroy:function(){},onDestroy:function(){},beforeFocus:function(){},onFocus:function(){}}};D.fn.qtip.styles={defaults:{background:"white",color:"#111",overflow:"hidden",textAlign:"left",width:{min:0,max:250},padding:"5px 9px",border:{width:1,radius:0,color:"#d3d3d3"},tip:{corner:false,color:false,size:{width:13,height:13},opacity:1},title:{background:"#e1e1e1",fontWeight:"bold",padding:"7px 12px"},button:{cursor:"pointer"},classes:{target:"",tip:"qtip-tip",title:"qtip-title",button:"qtip-button",content:"qtip-content",active:"qtip-active"}},cream:{border:{width:3,radius:0,color:"#F9E98E"},title:{background:"#F0DE7D",color:"#A27D35"},background:"#FBF7AA",color:"#A27D35",classes:{tooltip:"qtip-cream"}},light:{border:{width:3,radius:0,color:"#E2E2E2"},title:{background:"#f1f1f1",color:"#454545"},background:"white",color:"#454545",classes:{tooltip:"qtip-light"}},dark:{border:{width:3,radius:0,color:"#303030"},title:{background:"#404040",color:"#f3f3f3"},background:"#505050",color:"#f3f3f3",classes:{tooltip:"qtip-dark"}},red:{border:{width:3,radius:0,color:"#CE6F6F"},title:{background:"#f28279",color:"#9C2F2F"},background:"#F79992",color:"#9C2F2F",classes:{tooltip:"qtip-red"}},green:{border:{width:3,radius:0,color:"#A9DB66"},title:{background:"#b9db8c",color:"#58792E"},background:"#CDE6AC",color:"#58792E",classes:{tooltip:"qtip-green"}},blue:{border:{width:3,radius:0,color:"#ADD9ED"},title:{background:"#D0E9F5",color:"#5E99BD"},background:"#E5F6FE",color:"#4D9FBF",classes:{tooltip:"qtip-blue"}}}})(jQuery);