(function(a,d){var b={queue:1,sonar:1,"namespace":"tsq-stumble",callback:function(){}},c=a({});a.stumble=function(h){var j="scrollin.";if(!h.elem)a.extend(true,b,h);else{var e=a.extend(true,{},b,h),i=e.elem,l=a(i),m=i.href||d.href.replace(/\?.*/,"").replace(/\#.*/,""),n=l.data("type")||1,k=a('<iframe frameborder="0" scrolling="no" allowtransparency="true" style="border:none;"></iframe>'),o=["http://www.stumbleupon.com/badge/embed/",n,"/?url=",encodeURIComponent(m)],g=a('<div class="'+i.className+'"></div>'),f=function(a){g.append(k);k.bind("load",function(){e.callback();a&&a()}).attr("src",o.join(""))};l.replaceWith(g);if(e.sonar)g.bind(j+e.namespace,function(){g.unbind(j+e.namespace);if(e.queue)c.queue(f);else f()});else if(e.queue)c.queue(f);else f()}};a.fn.stumble=function(b){return this.each(function(){b=b||{};b.elem=this;a.stumble(b)})}})(jQuery,location);
