(function($){var name_space='brbr';$.fn[name_space]=function(options){var elements=this;var settings=$.extend({'move':'','swing':3,'count':3,'swingWidth':undefined},options);settings.swingWidth=(function(base){if(base)return base;var width=[];var count=settings.count;var swing=settings.swing;while(count--)width.push((count%2)?swing:-swing);return width})(settings.swingWidth);var match=['[\\w\\W]','$&'];if($.browser.safari)match[0]+='[\\D\\d]?';match[0]=new RegExp(match[0],'g');var text_class='jquery-'+name_space+'-plugin-text';match[1]='<span class="'+text_class+'">'+match[1]+'</span>';var img_class='jquery-'+name_space+'-plugin-img';elements.each(function(){$(this).find('a > img, a > :image').parent('a').addClass(img_class).hover(img_over,text_out);$(this).find('a:not('+img_class+')').each(split_text_node).hover(text_over,text_out)});function split_text_node(){var child=this.childNodes;for(var i=0,len=child.length;i<len;++i){var self=child[i];if(self.nodeType!=3)continue;var val=self.nodeValue;if(!val||/^\s*$/.test(val))continue;self.parentNode.innerHTML=val.replace.apply(val,match)}};function text_over(){var self=this;if($.data(self,name_space))return;$.data(self,name_space,true);var ps=settings.swingWidth.concat();var child=self.childNodes;for(var i=0,len=child.length;i<len;++i){var c=child[i];if(!c.style)continue;c.style.position='relative'};var move=settings.move;var val=setInterval(function(){var p=ps.shift();var child=self.childNodes;var i=0,len=child.length;if(!p){for(;i<len;++i){var c=child[i];if(c.className!=text_class)return;var st=c.style;st.position='';st.left='';st.top=''};return clearInterval(val)};for(;i<len;++i){var c=child[i];if(c.className!=text_class)return;c.style[move||(Math.floor(Math.random()+0.5)?'top':'left')]=(((i+ps.length)%2)?-3:3)+'px'}},25)};function text_out(){$.data(this,name_space,false)};function img_over(){if($.data(this,name_space))return;var $_=$(this);var css={};css.position=$_.css('position');css.top=$_.css('top');css.left=$_.css('left');$.data(this,name_space,css);$_.css('position','relative');var ps=settings.swingWidth.concat(settings.swingWidth);var move=settings.move;var val=setInterval(function(){var p=ps.shift();var d=move||(Math.floor(Math.random()+0.5)?'top':'left');if(p)return $_.css(d,p);$_.css(css);clearInterval(val)},10)};function text_out(){$.data(this,name_space,false)};return this}})(jQuery);