b2evolution PHP Cross Reference Blogging Systems

Source: /rsc/js/jquery/jquery.bubbletip.min.js - 14 lines - 8613 bytes - Text - Print

   1  /*
   2  * bubbletip
   3  *
   4  * Copyright (c) 2009-2010, UhLeeKa.
   5  * Version: 
   6  *      1.0.6
   7  * Licensed under the GNU Lesser General Public License:
   8  *     http://www.gnu.org/licenses/lgpl-3.0.html
   9  * Author Website: 
  10  *     http://www.uhleeka.com
  11  * Project Hosting on Google Code: 
  12  *     http://code.google.com/p/bubbletip/
  13  */
  14  (function(a){var b=0;var c=1e3;a.fn.extend({bubbletip:function(d,f){function u(){if(i.positionAt.match(/^element$/i)){var a=i.positionAtElement.offset();if(i.deltaDirection.match(/^up$/i)){j.top=a.top+i.offsetTop-o.outerHeight()+i.deltaShift;j.left=a.left+i.offsetLeft+(i.positionAtElement.outerWidth()-o.outerWidth())/2;j.delta=i.deltaPosition}else if(i.deltaDirection.match(/^down$/i)){j.top=a.top+i.positionAtElement.outerHeight()+i.offsetTop-i.deltaShift;j.left=a.left+i.offsetLeft+(i.positionAtElement.outerWidth()-o.outerWidth())/2;j.delta=-i.deltaPosition}else if(i.deltaDirection.match(/^left$/i)){j.top=a.top+i.offsetTop+(i.positionAtElement.outerHeight()-o.outerHeight())/2;j.left=a.left+i.offsetLeft-o.outerWidth()+i.deltaShift;j.delta=i.deltaPosition}else if(i.deltaDirection.match(/^right$/i)){j.top=a.top+i.offsetTop+(i.positionAtElement.outerHeight()-o.outerHeight())/2;j.left=a.left+i.positionAtElement.outerWidth()+i.offsetLeft-i.deltaShift;j.delta=-i.deltaPosition}}else if(i.positionAt.match(/^body$/i)){if(i.deltaDirection.match(/^up|left$/i)){j.top=i.offsetTop;j.left=i.offsetLeft;j.delta=i.deltaPosition}else{if(i.deltaDirection.match(/^down$/i)){j.top=parseInt(i.offsetTop+o.outerHeight());j.left=i.offsetLeft}else{j.top=i.offsetTop;j.left=parseInt(i.offsetLeft+o.outerWidth())}j.delta=-i.deltaPosition}}else if(i.positionAt.match(/^mouse$/i)){if(i.deltaDirection.match(/^up|left$/i)){if(i.deltaDirection.match(/^up$/i)){j.top=-(i.offsetTop+o.outerHeight());j.left=i.offsetLeft}else if(i.deltaDirection.match(/^left$/i)){j.top=i.offsetTop;j.left=-(i.offsetLeft+o.outerWidth())}j.delta=i.deltaPosition}else{j.top=i.offsetTop;j.left=i.offsetLeft;j.delta=-i.deltaPosition}}if(i.positionAt.match(/^element|body$/i)){o.css({position:"absolute",top:j.top+"px",left:j.left+"px"})}}function t(){var b;m=false;n=true;if(i.positionAt.match(/^element|body$/i)){if(i.deltaDirection.match(/^up|down$/i)){b={top:parseInt(j.top-j.delta)+"px"}}else{b={left:parseInt(j.left-j.delta)+"px"}}}else{if(i.deltaDirection.match(/^up|down$/i)){b={top:parseInt(j.mouseTop-j.delta)+"px"}}else{b={left:parseInt(j.mouseLeft-j.delta)+"px"}}}b=a.extend(b,{opacity:0});o.animate(b,i.animationDuration,i.animationEasing,function(){o.hide();n=false})}function s(){var b;if(m){return}m=true;if(n){o.stop(true,false)}if(i.calculateOnShow){u()}if(i.positionAt.match(/^element|body$/i)){if(i.deltaDirection.match(/^up|down$/i)){if(!n){o.css("top",parseInt(j.top+j.delta)+"px")}b={top:j.top+"px"}}else{if(!n){o.css("left",parseInt(j.left+j.delta)+"px")}b={left:j.left+"px"}}}else{if(i.deltaDirection.match(/^up|down$/i)){if(!n){j.mouseTop=e.pageY+j.top;o.css({top:parseInt(j.mouseTop+j.delta)+"px",left:parseInt(e.pageX-o.width()/2)+"px"})}b={top:j.mouseTop+"px"}}else{if(!n){j.mouseLeft=e.pageX+j.left;o.css({left:parseInt(j.mouseLeft+j.delta)+"px",top:parseInt(e.pageY-o.height()/2)+"px"})}b={left:j.left+"px"}}}n=false;g.css("z-index",c+1);g.css("position","relative");o.css("z-index",c);c++;o.show();b=a.extend(b,{opacity:1});o.animate(b,i.animationDuration,i.animationEasing,function(){o.css("opacity","");m=true})}if(a("table.bubbletip #"+a(d).get(0).id).length>0){return this}var g,h,i,j,k,l,m,n,o,p;var q,r;g=a(this);h=a(d);p=b++;i={positionAt:"element",positionAtElement:g,offsetTop:0,offsetLeft:0,deltaPosition:30,deltaShift:10,deltaDirection:"up",animationDuration:250,animationEasing:"swing",bindShow:"mouseover",bindHide:"mouseout",bindClose:"click",delayShow:0,delayHide:500,calculateOnShow:false,showOnInit:false};if(f){i=a.extend(i,f)}j={top:0,left:0,delta:0,mouseTop:0,mouseLeft:0,tipHeight:0,bindShow:(i.bindShow+" ").replace(/ +/g,".bubbletip"+p),bindHide:(i.bindHide+" ").replace(/ +/g,".bubbletip"+p),bindClose:(i.bindClose+" ").replace(/ +/g,".bubbletip"+p)};k=null;l=null;m=false;n=false;if(!g.data("bubbletip_tips")){g.data("bubbletip_tips",[[h.get(0).id,p]])}else{g.data("bubbletip_tips",a.merge(g.data("bubbletip_tips"),[[h.get(0).id,p]]))}if(!i.positionAt.match(/^element|body|mouse$/i)){i.positionAt="element"}if(!i.deltaDirection.match(/^up|down|left|right$/i)){i.deltaDirection="up"}if(i.deltaDirection.match(/^up$/i)){o=a('<table class="bubbletip" cellspacing="0" cellpadding="0"><tbody><tr><td class="bt-topleft"></td><td class="bt-top"></td><td class="bt-topright"></td></tr><tr><td class="bt-left"></td><td class="bt-content"></td><td class="bt-right"></td></tr><tr><td class="bt-bottomleft"></td><td><table class="bt-bottom" cellspacing="0" cellpadding="0"><tr><th></th><td><div></div></td><th></th></tr></table></td><td class="bt-bottomright"></td></tr></tbody></table>')}else if(i.deltaDirection.match(/^down$/i)){o=a('<table class="bubbletip" cellspacing="0" cellpadding="0"><tbody><tr><td class="bt-topleft"></td><td><table class="bt-top" cellspacing="0" cellpadding="0"><tr><th></th><td><div></div></td><th></th></tr></table></td><td class="bt-topright"></td></tr><tr><td class="bt-left"></td><td class="bt-content"></td><td class="bt-right"></td></tr><tr><td class="bt-bottomleft"></td><td class="bt-bottom"></td><td class="bt-bottomright"></td></tr></tbody></table>')}else if(i.deltaDirection.match(/^left$/i)){o=a('<table class="bubbletip" cellspacing="0" cellpadding="0"><tbody><tr><td class="bt-topleft"></td><td class="bt-top"></td><td class="bt-topright"></td></tr><tr><td class="bt-left"></td><td class="bt-content"></td><td class="bt-right-tail"><div class="bt-right"></div><div class="bt-right-tail"></div><div class="bt-right"></div></td></tr><tr><td class="bt-bottomleft"></td><td class="bt-bottom"></td><td class="bt-bottomright"></td></tr></tbody></table>')}else if(i.deltaDirection.match(/^right$/i)){o=a('<table class="bubbletip" cellspacing="0" cellpadding="0"><tbody><tr><td class="bt-topleft"></td><td class="bt-top"></td><td class="bt-topright"></td></tr><tr><td class="bt-left-tail"><div class="bt-left"></div><div class="bt-left-tail"></div><div class="bt-left"></div></td><td class="bt-content"></td><td class="bt-right"></td></tr><tr><td class="bt-bottomleft"></td><td class="bt-bottom"></td><td class="bt-bottomright"></td></tr></tbody></table>')}o.appendTo("body");if(/msie/.test(navigator.userAgent.toLowerCase())&&!/opera/.test(navigator.userAgent.toLowerCase())){a("*",o).each(function(){var b=a(this).css("background-image");if(b.match(/^url\(["']?(.*\.png)["']?\)$/i)){b=RegExp.$1;a(this).css({backgroundImage:"none",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true, sizingMethod="+(a(this).css("backgroundRepeat")=="no-repeat"?"crop":"scale")+", src='"+b+"')"}).each(function(){var b=a(this).css("position");if(b!="absolute"&&b!="relative")a(this).css("position","relative")})}})}a(".bt-content",o).append(h);h.show();if(i.deltaDirection.match(/^left|right$/i)){j.tipHeight=parseInt(h.height()/2);if(h.height()%2==1){j.tipHeight++}j.tipHeight=j.tipHeight<20?1:j.tipHeight-20;if(i.deltaDirection.match(/^left$/i)){a("div.bt-right",o).css("height",j.tipHeight+"px")}else{a("div.bt-left",o).css("height",j.tipHeight+"px")}}o.css("opacity",0);o.css({width:o.width(),height:o.height()});u();o.hide();a(window).bind("resize.bubbletip"+p,function(){var b=a(window).width();var c=a(window).height();if(b===q&&c===r){return}q=b;r=c;if(l){clearTimeout(l)}l=setTimeout(function(){u()},250)});a([o.get(0),this.get(0)]).bind(j.bindShow,function(){if(k){clearTimeout(k)}if(i.delayShow===0){s()}else{k=setTimeout(function(){s()},i.delayShow)}return false}).bind(j.bindHide,function(){if(k){clearTimeout(k)}if(i.delayHide===0){t()}else{k=setTimeout(function(){t()},i.delayHide)}return false});a(o.get(0)).bind(j.bindClose,function(){n=true;o.animate({opacity:0},i.animationDuration,i.animationEasing,function(){o.hide();n=false;m=false})});if(i.showOnInit){s()}return this},removeBubbletip:function(b){var c;var d=new Array;var e=new Array;var f,g,h;var i;c=a.makeArray(a(this).data("bubbletip_tips"));f=a.makeArray(b);for(g=0;g<f.length;g++){d.push(a(f[g]).get(0).id)}for(g=0;g<c.length;g++){h=null;if(d.length==0||(h=a.inArray(c[g][0],d))>=0){i=a("#"+c[g][0]).get(0).parentNode;while(i.tagName.toLowerCase()!="table"){i=i.parentNode}a("#"+c[g][0]).appendTo("body").hide();a(i).remove();a(this).unbind(".bubbletip"+c[g][1]);a(window).unbind(".bubbletip"+c[g][1])}else{e.push(c[g])}}a(this).data("bubbletip_tips",e);return this}})})(jQuery)

title

Description

title

Description

title

Description

title

title

Body