jQuery.fn.inc = function(url, transform, post) {
    return this.each(function() {
	    var t = $(this);

	    var transfer = function(txt) {
		t.html($.isFunction(transform) ? transform(txt) : txt);
		if (post) {
		    post();
		}
	    };

	    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') {
			    transfer(document.frames(f).document.body.innerHTML);
			}
		    }).attr('src', url).appendTo(document.body);

	    }
	    else {
		$.ajax({
			url: url,
			complete: function(res, status) {
			    if (status == 'success') transfer(res.responseText);
			}
		    });
	    }
	});
};

$(function() {
	$('[@class~=inc]').each(function() {
		$(this).inc(unescape(this.className.replace(/.*inc:([^ ]+)( .*|$)/, '$1')));
	    });
    });

