/*jQuery WiggleAuthor: WonderGroup, Jordan ThomasURL: http://labs.wondergroup.com/demos/mini-ui/index.htmlLicense: MIT (http://en.wikipedia.org/wiki/MIT_License)*/jQuery.fn.wiggle=function(o){vard={speed:50,wiggles:3,travel:5,callback:null};varo=jQuery.extend(d,o);returnthis.each(function(){varcache=this;varwrap=jQuery(this).wrap('<div class="wiggle-wrap"></div>').css("position","relative");varcalls=0;for(i=1;i<=o.wiggles;i++){jQuery(this).animate({left:"-="+o.travel},o.speed).animate({left:"+="+o.travel*2},o.speed*2).animate({left:"-="+o.travel},o.speed,function(){calls++;if(jQuery(cache).parent().hasClass('wiggle-wrap')){jQuery(cache).parent().replaceWith(cache);}if(calls==o.wiggles&&jQuery.isFunction(o.callback)){o.callback();}});}});};