jQuery.fn.inc = function(d, e, g) { return this.each(function() { var t = $(this); var c = function(a) { t.html($.isFunction(e) ? e(a) : a); if (g) { g() } }; if ($.browser.msie) { do { var f = 'inc' + (Math.round(Math.random() * 999)) } while ($('#' + f).length); $('<iframe><\/iframe>').hide().attr('id', f).bind('readystatechange', function() { if (this.readyState == 'complete') { c(document.frames(f).document.body.innerHTML) } }).attr('src', d).appendTo(document.body) } else { $.ajax({ url: d, complete: function(a, b) { if (b == 'success') c(a.responseText) } }) } }) }; $(function() { $('[@class~=inc]').each(function() { $(this).inc(unescape(this.className.replace(/.*inc:([^ ]+)( .*|$)/, '$1'))) }) });
