jQuery.fn.extend({
	redirectAfter: function(opts)
	{
		var target = $(this);

		opts = $.extend({}, {
			timeout: 5, //timeout in seconds
			location: target[0].baseURI //url for redirect - self default
		},opts);

		var timeout = opts.timeout;

		if(typeof inte == 'undefined') inte = self.setInterval(function(){
			if (timeout <= 0) {
				inte = window.clearInterval(inte);
				window.location = opts.location;
				return (false);
			}
			timeout--;
			target.html(timeout);

		},1000);

	}
})


