/*!
* jQuery clueTip plugin v1.2.5
*
* Date: Tue Jul 03 14:46:43 2012 EDT
* Requires: jQuery v1.3+
*
* Copyright 2012, Karl Swedberg
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*
* Examples can be found at http://plugins.learningjquery.com/cluetip/demo/
*
*/
(function(c){c.cluetip={version:"1.2.5",template:'
',setup:{insertionType:"appendTo",insertionElement:"body"},defaults:{multiple:false,width:275,height:"auto",cluezIndex:97,positionBy:"auto",topOffset:15,leftOffset:15,local:false,localPrefix:null,localIdSuffix:null,hideLocal:true,attribute:"rel",
titleAttribute:"title",splitTitle:"",escapeTitle:false,showTitle:true,cluetipClass:"default",hoverClass:"",waitImage:true,cursor:"help",arrows:false,dropShadow:true,dropShadowSteps:6,sticky:false,mouseOutClose:false,activation:"hover",clickThrough:true,tracking:false,delayedClose:0,closePosition:"top",closeText:"Close",truncate:0,fx:{open:"show",openSpeed:""},hoverIntent:{sensitivity:3,interval:50,timeout:0},onActivate:function(){return true},onShow:function(){},onHide:function(){},ajaxCache:true,
ajaxProcess:function(l){return l=l.replace(/<(script|style|title)[^<]+<\/(script|style|title)>/gm,"").replace(/<(link|meta)[^>]+>/g,"")},ajaxSettings:{dataType:"html"},debug:false}};var B,L={},ia=0,R=0;c.fn.attrProp=c.fn.prop||c.fn.attr;c.fn.cluetip=function(l,p){function S(E,j){var k=E||"";j=j||"";if(typeof j=="object")c.each(j,function(i,d){k+="-"+i+"-"+d});else if(typeof j=="string")k+=j;return k}function T(E,j,k){k="";j=j.dropShadow&&j.dropShadowSteps?+j.dropShadowSteps:0;if(c.support.boxShadow){if(j)k=
"1px 1px "+j+"px rgba(0,0,0,0.5)";E.css(c.support.boxShadow,k);return false}k=E.find(".cluetip-drop-shadow");if(j==k.length)return k;k.remove();k=[];for(var i=0;i';return k=c(k.join("")).css({position:"absolute",backgroundColor:"#000",zIndex:U-1,opacity:0.1}).addClass("cluetip-drop-shadow").prependTo(E)}var e,h,F,s,G,da;if(typeof l=="object"){p=l;l=null}if(l=="destroy"){var V=this.data("cluetip");if(V){c(V.selector).remove();c.removeData(this,
"title");c.removeData(this,"cluetip")}c(document).unbind(".cluetip");return this.unbind(".cluetip")}p=c.extend(true,{},c.cluetip.defaults,p||{});ia++;var U;V=c.cluetip.backCompat||!p.multiple?"cluetip":"cluetip-"+ia;var ea="#"+V,v=c.cluetip.backCompat?"#":".",Y=c.cluetip.setup.insertionType,oa=c.cluetip.setup.insertionElement||"body";Y=/appendTo|prependTo|insertBefore|insertAfter/.test(Y)?Y:"appendTo";e=c(ea);if(!e.length){e=c(c.cluetip.template)[Y](oa).attr("id",V).css({position:"absolute",display:"none"});
U=+p.cluezIndex;F=e.find(v+"cluetip-outer").css({position:"relative",zIndex:U});h=e.find(v+"cluetip-inner");s=e.find(v+"cluetip-title")}B=c("#cluetip-waitimage");if(!B.length&&p.waitImage){B=c("").attr("id","cluetip-waitimage").css({position:"absolute"});B.insertBefore(e).hide()}var pa=(parseInt(e.css("paddingLeft"),10)||0)+(parseInt(e.css("paddingRight"),10)||0);this.each(function(E){function j(){return false}function k(b,f){var g=b.status;f.beforeSend(b.xhr,f);if(g=="error")f[g](b.xhr,
b.textStatus);else g=="success"&&f[g](b.data,b.textStatus,b.xhr);f.complete(b.xhr,f.textStatus)}var i=this,d=c(this),a=c.extend(true,{},p,c.metadata?d.metadata():c.meta?d.data():d.data("cluetip")||{}),H=false,M=false,ja=0,o=a[a.attribute]||(a.attribute=="href"?d.attr(a.attribute):d.attrProp(a.attribute)||d.attr(a.attribute)),W=a.cluetipClass;U=+a.cluezIndex;d.data("cluetip",{title:i.title,zIndex:U,selector:ea});a.arrows&&!e.find(".cluetip-arrows").length&&e.append('');
if(!o&&!a.splitTitle&&!l)return true;if(a.local&&a.localPrefix)o=a.localPrefix+o;a.local&&a.hideLocal&&o&&c(o+":first").hide();var t=parseInt(a.topOffset,10),C=parseInt(a.leftOffset,10),D,fa,Z=isNaN(parseInt(a.height,10))?"auto":/\D/g.test(a.height)?a.height:a.height+"px",$,w,x,N,aa,ga=parseInt(a.width,10)||275,q=ga+pa+a.dropShadowSteps,I=this.offsetWidth,y,m,r,O,J,z=a.attribute!="title"?d.attrProp(a.titleAttribute)||"":"";if(a.splitTitle){J=z.split(a.splitTitle);z=a.showTitle||J[0]===""?J.shift():
""}if(a.escapeTitle)z=z.replace(/&/g,"&").replace(/>/g,">").replace(/y&&y>q||y+I+q+C>O?y-q-C:I+y+C;if(i.tagName.toLowerCase()=="area"||a.positionBy=="mouse"||I+q>O)if(r+20+q>O){e.addClass("cluetip-"+W);m=r-q-C>=0?r-q-C-parseInt(e.css("marginLeft"),10)+parseInt(h.css("marginRight"),10):r-q/2}else m=r+C;f=m<0?b.pageY+t:b.pageY;if(m<0||a.positionBy=="bottomTop")m=r+q/2>O?O/2-
q/2:Math.max(r-q/2,0)}G.css({zIndex:d.data("cluetip").zIndex+1});e.css({left:m,zIndex:d.data("cluetip").zIndex});fa=c(window).height();if(l){if(typeof l=="function")l=l.call(i);h.html(l);P(f)}else if(J){b=J.length;h.html(b?J[0]:"");if(b>1)for(var n=1;n'+J[n]+"");P(f)}else if(!a.local&&o.indexOf("#")!==0)if(/\.(jpe?g|tiff?|gif|png)(?:\?.*)?$/i.test(o)){h.html('
');P(f)}else{var Q=a.ajaxSettings.beforeSend,ka=a.ajaxSettings.error,
la=a.ajaxSettings.success,ma=a.ajaxSettings.complete;g=S(o,a.ajaxSettings.data);b=c.extend(true,{},a.ajaxSettings,{cache:a.ajaxCache,url:o,beforeSend:function(u,A){Q&&Q.call(i,u,e,h,A);F.children().empty();a.waitImage&&B.css({top:N+20,left:r+20,zIndex:d.data("cluetip").zIndex-1}).show()},error:function(u,A){if(p.ajaxCache&&!L[g])L[g]={status:"error",textStatus:A,xhr:u};if(M)ka?ka.call(i,u,A,e,h):h.html("sorry, the contents could not be loaded")},success:function(u,A,K){if(p.ajaxCache&&!L[g])L[g]=
{status:"success",data:u,textStatus:A,xhr:K};H=a.ajaxProcess.call(i,u);if(typeof H=="object"&&H!==null){z=H.title;H=H.content}if(M){la&&la.call(i,u,A,e,h);h.html(H)}},complete:function(u,A){ma&&ma.call(i,u,A,e,h);var K=h[0].getElementsByTagName("img");R=K.length;for(var ha=0,qa=K.length;ha'+a.closeText+"");a.closePosition=="bottom"?f.appendTo(h):a.closePosition=="title"?f.prependTo(s):f.prependTo(h);f.bind("click.cluetip",
function(){X();return false});a.mouseOutClose?e.bind("mouseleave.cluetip",function(){X()}):e.unbind("mouseleave.cluetip")}F.css({zIndex:d.data("cluetip").zIndex,overflow:Z=="auto"?"visible":"auto",height:Z});D=Z=="auto"?Math.max(e.outerHeight(),e.height()):parseInt(Z,10);x=w;aa=$+fa;if(a.positionBy=="fixed")x=w-a.dropShadowSteps+t;else if(mr||a.positionBy=="bottomTop")if(w+D+t>aa&&N-$>D+t){x=N-D-t;g="top"}else{x=N+t;g="bottom"}else x=w+D+t>aa?D>=fa?$:aa-D-t:d.css("display")=="block"||
i.tagName.toLowerCase()=="area"||a.positionBy=="mouse"?b-t:w-a.dropShadowSteps;if(g==="")g=m=0&&b>0?w-x-a.dropShadowSteps:0;n=g>n?n:g;n+="px"}G.css({top:n}).show()}else G.hide();(da=T(e,a))&&da.length&&da.hide().css({height:D,width:ga,zIndex:d.data("cluetip").zIndex-
1}).show();e.hide()[a.fx.open](a.fx.openSpeed||0);c.fn.bgiframe&&e.bgiframe();if(a.delayedClose>0)ja=setTimeout(X,a.delayedClose);a.onShow.call(i,e,h)},ca=function(){M=false;B.hide();if(!a.sticky||/click|toggle/.test(a.activation)){X();clearTimeout(ja)}a.hoverClass&&d.removeClass(a.hoverClass)},X=function(b){b=b&&b.data("cluetip")?b:d;var f=b.data("cluetip")&&b.data("cluetip").selector,g=c(f||"div.cluetip"),n=g.find(v+"cluetip-inner"),Q=g.find(v+"cluetip-arrows");g.hide().removeClass();a.onHide.call(b[0],
g,n);if(f){b.removeClass("cluetip-clicked");b.css("cursor","")}f&&z&&b.attrProp(a.titleAttribute,z);a.arrows&&Q.css({top:""})};c(document).unbind("hideCluetip.cluetip").bind("hideCluetip.cluetip",function(b){X(c(b.target))});if(/click|toggle/.test(a.activation))d.bind("click.cluetip",function(b){if(e.is(":hidden")||!d.is(".cluetip-clicked")){ba(b);c(".cluetip-clicked").removeClass("cluetip-clicked");d.addClass("cluetip-clicked")}else ca(b);return false});else if(a.activation=="focus"){d.bind("focus.cluetip",
function(b){d.attrProp("title","");ba(b)});d.bind("blur.cluetip",function(b){d.attrProp("title",d.data("cluetip").title);ca(b)})}else{d[a.clickThrough?"unbind":"bind"]("click.cluetip",j);var na=function(b){if(a.tracking){var f=m-b.pageX,g=x?x-b.pageY:w-b.pageY;d.bind("mousemove.cluetip",function(n){e.css({left:n.pageX+f,top:n.pageY+g})})}};c.fn.hoverIntent&&a.hoverIntent?d.hoverIntent({sensitivity:a.hoverIntent.sensitivity,interval:a.hoverIntent.interval,over:function(b){ba(b);na(b)},timeout:a.hoverIntent.timeout,
out:function(b){ca(b);d.unbind("mousemove.cluetip")}}):d.bind("mouseenter.cluetip",function(b){ba(b);na(b)}).bind("mouseleave.cluetip",function(b){ca(b);d.unbind("mousemove.cluetip")});d.bind("mouseover.cluetip",function(){d.attrProp("title","")}).bind("mouseleave.cluetip",function(){d.attrProp("title",d.data("cluetip").title)})}});return this};(function(){c.support=c.support||{};for(var l=document.createElement("div").style,p=["boxShadow"],S=["moz","Moz","webkit","o"],T=0,e=p.length;T'})})(jQuery);